Trade
1. Two-Step Trading Process
Header parameters
AuthorizationstringRequired
User-IdstringRequired
User-AgentstringRequiredExample:
Apifox/1.0.0 (https://apifox.com)Content-TypestringRequiredExample:
application/jsonAcceptstringRequiredExample:
*/*HoststringRequiredExample:
127.0.0.1:8942ConnectionstringRequiredExample:
keep-aliveBody
symbolstringRequired
E.g.: runes-THIRD•THIRD•TEST•TEO/btc-BTC, the latter is the quote currency
sidestringRequired
buy/sell, if runes is at the front, it means buy runes or sell runes
quantitystringRequired
Quantity
enable_channelbooleanRequired
Whether to use channel payment
Responses
200Success
application/json
codeintegerRequired
msgstringRequired
req_idstringRequired
post/taker/api/swap/quote
POST /taker/api/swap/quote HTTP/1.1
Host: 127.0.0.1:8090
Authorization: text
User-Id: text
User-Agent: text
Accept: text
Connection: text
Content-Type: application/json
Content-Length: 107
{
"symbol": "runes-DOG•GO•TO•THE•MOON/btc-BTC",
"side": "sell",
"quantity": "4000",
"enable_channel": true
}200Success
{
"code": 0,
"msg": "",
"data": {
"quote_id": "qt_1998957042239864832",
"symbol": "runes-DOG•GO•TO•THE•MOON/btc-BTC",
"from": {
"coin_type": "btc",
"tick": "BTC",
"token_id": "",
"amount": "8195"
},
"to": {
"coin_type": "runes",
"tick": "DOG•GO•TO•THE•MOON",
"token_id": "",
"amount": "1000"
},
"price": "1.2 DOG•GO•TO•THE•MOON/sat"
},
"req_id": "1998957042151817216"
}Header parameters
AuthorizationstringRequired
User-IdstringRequired
User-AgentstringRequiredExample:
Apifox/1.0.0 (https://apifox.com)Content-TypestringRequiredExample:
application/jsonAcceptstringRequiredExample:
*/*HoststringRequiredExample:
127.0.0.1:8942ConnectionstringRequiredExample:
keep-aliveBody
quote_idstringRequired
fee_rateintegerRequired
slippagestringRequired
enable_channelbooleanRequired
Responses
200Success
application/json
codeintegerRequired
msgstringRequired
req_idstringRequired
post/taker/api/swap/submit
POST /taker/api/swap/submit HTTP/1.1
Host: 127.0.0.1:8090
Authorization: text
User-Id: text
User-Agent: text
Accept: text
Connection: text
Content-Type: application/json
Content-Length: 88
{
"quote_id": "qt_1992877903283023872",
"fee_rate": 2,
"slippage": "12",
"enable_channel": true
}200Success
{
"code": 0,
"msg": "",
"data": {
"order_id": "dex_v2_mt_lighting_1999015317438267392",
"tx_id": "4e3efcb6bddc03c9c38549b89649a6676f31d450c05590ccacd3e877a1016dad"
},
"req_id": "1999015317430054912"
}2. Quick Trading
Header parameters
AuthorizationstringRequired
User-IdstringRequired
User-AgentstringRequiredExample:
Apifox/1.0.0 (https://apifox.com)Content-TypestringRequiredExample:
application/jsonAcceptstringRequiredExample:
*/*HoststringRequiredExample:
127.0.0.1:8942ConnectionstringRequiredExample:
keep-aliveBody
symbolstringRequired
E.g.: runes-THIRD•THIRD•TEST•TEO/btc-BTC, the latter is the quote currency
sidestringRequired
buy/sell, if runes is at the front, it means buy runes or sell runes
quantitystringRequired
Quantity
fee_rateintegerRequired
slippagestringRequired
enable_channelbooleanRequired
Whether to use channel payment
Responses
200Success
application/json
objectOptional
post/taker/api/swap/quick
POST /taker/api/swap/quick HTTP/1.1
Host: 127.0.0.1:8090
Authorization: text
User-Id: text
User-Agent: text
Accept: text
Connection: text
Content-Type: application/json
Content-Length: 138
{
"symbol": "runes-THIRD•THIRD•TEST•TEO-/btc-BTC-",
"side": "sell",
"quantity": "4000",
"fee_rate": 2,
"slippage": "12",
"enable_channel": true
}200Success
{}Last updated