Swap 처리
POST https://{dashboard-domain}/v1.0/db/swap
Headers
Authorization*
string
Bearer {{web-access-token}}
Content-Type*
string
application/json
Request Body
event_id*
int
이벤트ID
3: 포인트 -> 코인
4 : 코인 -> 포인트
point*
object
포인트 정보
app_id*
string
앱 ID
point_id*
int
포인트 ID
adjust_point_quantity*
int64
포인트 조정량
coin*
object
코인 정보
coin_id*
int
코인ID
adjust_coin_quantity*
float64
코인 조정량
otp_code*
string
Authenticator 앱에서 발급 받은 6자리 OTP code
{
"return": 0,
"message": "success",
"value": {
"au_id": 19,
"point": {
"mu_id": 28,
"app_id": 1,
"database_id": 1,
"point_id": 1,
"previous_point_quantity": 2100,
"adjust_point_quantity": -110,
"point_quantity": 1990
},
"coin": {
"coin_id": 2,
"walletaddress": "0x0cE183FBE350BE042c9F456Da78CfADAA5Cf1225",
"previous_coin_quantity": 0,
"adjust_coin_quantity": 11,
"coin_quantity": 11
},
"log_id": 2,
"event_id": 3
}
}{
"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
}
}au_id
int64
계정의 UID
point
object
포인트 정보
mu_id
int64
계정의 포인트 UID
app_id
int64
앱 ID
database_id
int64
데이터베이스 ID
point_id
int64
포인트 ID
previous_point_quantity
int64
이전 포인트량
adjust_point_quantity
int64
증감 포인트량
point_quantity
int64
최종 포인트량
coin
object
코인 정보
coin_id
int64
코인 ID
walletaddress
string
지갑주소
previous_coin_quantity
float64
이전 코인량
adjust_coin_quantity
float64
증감 코인량
coin_quantity
float64
최종 코인량
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
성공
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 에러
Last updated