SwapBox V1 API
Request and Return
RESTFUl access format:
Add request header Content-Type: application/json;charset=UTF-8
interface address:
https://api.v2.nabox.io/nabox-api
Return format:
//Successful example
{
"code": 1000, //return code, 1000 means success, the rest means failure
"msg": "success", //return message
"data": { //return data
"success": true
}
}
//error example
{
"code": 1002,
"msg": "Language type error",
"data": null
}Interface Details
SWAP
Query chain configuration
Detailed description: Query the swap configuration information of each chain currently supported by nabox. All applications should first call this interface to obtain the chain configuration (chain information and asset information) and cache it locally.
Access:
/swap/info
get
Query swap configuration information
parameters: none
return:
Query order details
Detailed description: Query the details of swap transactions initiated by swapbox through the order id.
access:
/swap/tx/orderId
post
Query swap transaction details
parameter:
language
string
Y
Language: EN/CHS
orderId
string
Y
The order id of the transaction
return:
Query order list
Detailed description: Query the order list through the originating address, and return the latest 10 records.
access:
/swap/tx/query
post
Query swap transaction list
parameter:
language
string
Y
Language: EN/CHS
nativeId
int
Y
evmChainId
address
string
Y
User address
return:
Last updated