Swap 요청*
POST
https://{dashboard-domain}/v1.0/db/swap
Headers
Authorization*
string
Bearer {{web-access-token}}
Content-Type*
string
application/json
Request Body
tx_type
int
swap type
3: 포인트 -> 코인
4 : 코인 -> 포인트 26 : 코인 -> 코인
from_point
object
보낼 포인트 정보
app_id
int64
앱 ID
point_id
int64
포인트 ID
adjust_point_quantity
int64
포인트 조정량
(포인트->코인 이면 음수)
to_point
object
받을 포인트 정보
app_id
int64
앱 ID
point_id
int64
포인트 ID
adjust_point_quantity
int64
포인트 조정량
(코인->코인 이면 양수
from_coin
object
보낼 코인 정보
coin_id
int
코인ID
adjust_coin_quantity
float64
코인 조정량 (음수)
to_coin
object
받을 코인 정보
coin_id
int
코인ID
adjust_coin_quantity
float64
코인 조정량 (양수)
otp_code
string
Authenticator 앱에서 발급 받은 6자리 OTP code
{
"return": 0,
"message": "success",
"value": {
"au_id": 5,
"from_point": {
"mu_id": 0,
"app_id": 0,
"database_id": 0,
"point_id": 0,
"previous_point_quantity": 0,
"adjust_point_quantity": 0,
"point_quantity": 0
},
"to_point": {
"mu_id": 0,
"app_id": 0,
"database_id": 0,
"point_id": 0,
"previous_point_quantity": 0,
"adjust_point_quantity": 0,
"point_quantity": 0
},
"from_coin": {
"coin_id": 7,
"coin_symbol": "SUI",
"base_coin_id": 3,
"base_coin_symbol": "SUI",
"walletaddress": "0x40e6c9a38833fae2276c231fadcb1d133ce9e4258159292b1ccfc8553a0a1279",
"to_wallet": "0xd61a033f4644551427a486c495bd91c25883fbac7ab37f2e871be43de3d01c21",
"wallet_type_id": 2,
"wallet_id": 100000152,
"adjust_coin_quantity": -0.01,
"token_tx_hash": "",
"is_complete": false
},
"to_coin": {
"coin_id": 1,
"coin_symbol": "ONIT",
"base_coin_id": 1,
"base_coin_symbol": "ETH",
"walletaddress": "0x38f998d033990a315b08AFc0F78059Fb7D11Dc4d",
"to_wallet": "",
"wallet_type_id": 1,
"wallet_id": 100000112,
"adjust_coin_quantity": 0.01,
"token_tx_hash": "",
"is_complete": false
},
"tx_type": 26,
"swap_fee_coin_id": 4,
"swap_fee_coin_symbol": "ETH",
"swap_fee": 0.0003587810287,
"swap_fee_string": "358781028700000",
"swap_fee_string_d": "0.0003587810287",
"to_wallet": "0xfc788F6956E98feb367b04f442F7CF8C771c25E9",
"inno_uid": "Qf40Wch7uricUnCcZapBqntoEHgykf4cD/FlvEDlRUs=",
"tx_id": 2000000000000000347,
"create_at": 1720770698,
"tx_hash": "",
"is_fee_complete": false
}
}
{
"return": 12200,
"message": "Transfer inprogress"
}
{
// "tx_type" : 3,
// "otp_code" : "690455",
// "from_point" : {
// "app_id" : 1,
// "point_id" : 1,
// "adjust_point_quantity" : -10000
// },
// "to_coin" :{
// "coin_id" : 2,
// "adjust_coin_quantity" : 277
// }
// "tx_type" : 4,
// "from_coin" :{
// "coin_id" : 7,
// "adjust_coin_quantity" : -277
// },
// "to_point": {
// "app_id": 1,
// "point_id": 1,
// "adjust_point_quantity": 9999
// }
"tx_type" : 26,
"from_coin" :{
"coin_id" : 7,
"adjust_coin_quantity" : -0.01
},
"to_coin" :{
"coin_id" : 1,
"adjust_coin_quantity" : 0.01
}
}
au_id
int64
계정의 UID
from_point
object
보낼 포인트 정보 (P2C 일때만 유효)
mu_id
int64
계정의 포인트 MUID
app_id
int64
앱 ID
database_id
int64
데이터베이스 ID
point_id
int64
포인트 ID
previous_point_quantity
int64
이전 포인트량
adjust_point_quantity
int64
감소 포인트량(항상 음수)
point_quantity
int64
최종 포인트량
to_point
object
받을 포인트 정보 (C2P 일때만 유효)
mu_id
int64
계정의 포인트 MUID
app_id
int64
앱 ID
database_id
int64
데이터베이스 ID
point_id
int64
포인트 ID
previous_point_quantity
int64
이전 포인트량
adjust_point_quantity
int64
증가 포인트량(항상 양수)
point_quantity
int64
최종 포인트량
from_coin
object
보낼 코인 정보 (C2P, C2C 일때만 유효)
coin_id
int64
보낼 코인 ID
coin_symbol
string
보낼 코인 심볼
base_coin_id
int64
보낼 코인의 베이스 코인 ID
base_coin_symbol
string
보낼 코인의 베이스 코인 심볼
walletaddress
string
지갑주소(유져지갑)
to_wallet
string
전송 타겟 지갑 주소(법인지갑)
wallet_type_id
int64
지갑 종류 ID
wallet_id
int64
지갑 ID
adjust_coin_quantity
float64
증감 코인량
token_tx_hash
string
전송 tx hash 정보
is_complete
bool
전송 완료 여부
to_coin
object
받을 코인 정보 (P2C, C2C 일때만 유효)
coin_id
int64
받을 코인 ID
coin_symbol
string
받을 코인 심볼
base_coin_id
int64
받을 코인의 베이스 코인 ID
base_coin_symbol
string
받을 코인의 베이스 코인 심볼
walletaddress
string
지갑주소(유져지갑)
to_wallet
string
unused
wallet_type_id
int64
지갑 종류 ID
wallet_id
int64
지갑 ID
adjust_coin_quantity
float64
증감 코인량
token_tx_hash
string
전송 tx hash 정보
is_complete
bool
전송 완료 여부
tx_type
int64
Swap 타입
3: 포인트 -> 코인
4 : 코인 -> 포인트 26 : 코인 -> 코인
swap_fee_coin_id
int64
Swap을 위해 납부해야할 수수료 코인 ID (ETH, MATIC, SUI 코인 계열)
swap_fee_coin_symbol
string
swap을 위해 납부해야할 수수료 코인의 심볼 (ETH, MATIC, SUI 코인 계열)
swap_fee
float64
납부 해야할 수수료 (decimal 처리 되어 있음)
swap_fee_string
string
swap_fee 의 string 형
swap_fee_string_d
string
swap_fee_string 의 decimal 처리 값
to_wallet
string
수수료 전송 받을 지갑 주소
inno_uid
string
INNO ID
tx_id
int64
Swap ID(swap 상태 변경 api 에 사용)
create_at
int64
생성 시간 (second)
tx_hash
string
수수료 전송 txhash
is_fee_complete
bool
수수료 전송 성공 여부
curl --location --request POST 'https://localhost:51031/v1.0/db/swap' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhY2Nlc3NfdXVpZCI6ImRkYTExNTZiLTBlODUtNGQwMS04OTEzLTQwN2MxZWVkZTEzZSIsImF1X2lkIjoyNSwiZXhwIjoxNjQ2NDEwOTI0OTIyLCJpbm5vX3VpZCI6Ikprb1l1RnZFaEhIenVUYXBsNHlvN3M1SEx3Q08vOWVOSSs4c29icGJsRk1kdS8rNW9UTnNiSm91MHJpR1RnRUMiLCJsb2dpbl90eXBlIjo0fQ.8LT7xGi8KlUHBEvMBjAcry3lXz0jVg6UgdgP_6azJLY' \
--header 'Content-Type: application/json' \
--data-raw '{
"event_id" : 3,
"otp_code" : "690455",
"point" : {
"app_id" : 1,
"point_id" : 1,
"adjust_point_quantity" : -50
},
"coin" :{
"coin_id" : 2,
"adjust_coin_quantity" : 50
}
}'
0
success
성공
500
internal server error
내부 서버 에러
32100
EventID is invalid
eventid 유효성 에러
32101
AppID is invalid
appid 유효성 에러
32102
PointID is invalid
pointid 유효성 에러
32103
point quantity is invalid
point 수량 유효성 에러
32104
CoinID is invalid
coinid 유효성 에러
32105
Coin quantity is invalid
coin 수량 유효성 에러
32106
Adjust quantity is invalid
adjust 수량 유효성 에러
32201
App point information does not exist
swap 하려는 app point 정보가 없음
32202
Unknown swap error
알 수 없는 Swap 에러
34004
GetMeCoinList DB Scan Error
내부 DB 에러
34005
GetListMembers DB Scan Error
내부 DB 에러
34007
db get account wallet list error.
내부 DB 에러
34008
do not exist wallet
보유하고 있는 지갑이 없다.
36007
lack of gas
수수료 부족
Last updated