Swap Order Info (GET)

Swap Order Info

This API is used to query the order information of Fast Buy / Sell, the params of ids comes from the response of Fast Buy / Sell

URL

Header: X-API-KEY

(Please do not disclose your API Key to anyone. If you are at risk of losing it, please refresh it.)

Parameters

{ids} order_id1,order_id2 Required

Notes

  1. X-API-KEY can be obtained in your "Dashboard", go to check: Dashboard

  2. In the paging type interface, use the next field in the return value as the query parameter for the next page (if next == null, it means that paging has ended)

Results

{
	"err": false,
	"res": [
		{
			"id": "lwzrpe4g01uc90",
			"state": "done",
			"chain": "solana",
			"tradeType": "sell",
			"txPriceUsd": 0.0121567895,
			"swapHash": "46mGDpx1o9hVcNMShhUG7BwuH4XbuhBKJEVc9BW4QL3w79oZyn7Wxkfgf37QkEVS2VfSeYtMtucQhS8sTnVDAxBf",
			"errorCode": "",
			"errorMessage": ""
		},
		{
			"id": "lwyrpa4605uc56",
			"state": "fail",
			"chain": "solana",
			"tradeType": "buy",
			"errorCode": "E_OTHERS",
			"errorMessage": "AccountNotFound\n"
		}
	],
	"docs": "https://dbotx.com/docs"
}

Response Parameters

  • id: Order id

  • state: Order state (init/processing/done/fail/expired)

  • chain: Blockchain (solana/ethereum/base/bsc/tron)

  • tradeType: Trade type, with values of buy and sell

  • txPriceUsd:Buy / sell price

  • swapHash: Transaction hash

  • errorCode: Error type

  • errorMessage: Error message

Last updated