Swap 요청*

POST https://{dashboard-domain}/v1.0/db/swap

Headers

Name
Type
Description

Authorization*

string

Bearer {{web-access-token}}

Content-Type*

string

application/json

Request Body

Name
Type
Description

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
    }
}
{
    // "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
    }
}

Last updated