Query Orders

orderquery blockchain orders

Describes how to use the Spell API to query orders.

After an order is generated, users can query it via the web interface or API requests.

Order details provide essential Spell order information along with a breakdown of the blockchain transaction. This includes key details like the Blockchain, Block Number, Transaction Hash, Timestamp, Sender, Recipient, Token Type, Transfer Amount, and Network Fee. Additionally, you can use the transaction hash to verify the transfer on the respective blockchain explorer.


API Documentation

Preparation

Before making a request, you may prepare the following data. The IDs obtained from these requests can be used as filter parameters in your query:

  • Get the list of supported blockchains: GET /api/v1/chain
  • Get the list of supported tokens: GET /api/v1/token
  • Get the list of pre-created addresses: GET /api/v1/address

Request

  • GET /api/v1/order
  • Headers:
    • X-API-Key: '<API Key>'
  • Request Parameters:
ParameterTypeRequiredOther RequirementsParameter Description
pagenumberNoPage number, defaults to 1
sizenumberNoNumber of items per page, defaults to 10
sortstringNoSorting field. Add a - prefix for descending order. Default: -created
typestringNoOrder confirmation type
group_nostringNoGroup number
order_nostringNoOrder number
chainstringNo15-character stringChain ID obtained during preparation
tokenstringNo15-character stringToken ID obtained during preparation
addressstringNo15-character stringAddress ID obtained during preparation

Response

The response type is application/json.

  • total is the total number of items that match the criteria.
  • page and size represent the current pagination settings.
  • items is an array of order data for the current page.
Success 200
{
  "code": 200,
  "page":1,
  "size":10,
  "total": 100,
  "items": [
      {
      "id": "order_id",
      "type": "tail", // id | tail
      "group_no": "",
      "order_no": "external_order_no",
      "user": "RELATION_RECORD_ID",
      "chain": "RELATION_RECORD_ID",
      "address": "RELATION_RECORD_ID",
      "token": "RELATION_RECORD_ID",
      "amount": 123,
      "tail": "5623", // empty for id type
      "status": 0, // 0: pending, 1: success, 2: overdue
      "pay_time": "", // empty when created
      "timeout": 1800, // seconds, default 1800
      "return_url": "https://domain.com/path",
      "created": "2022-01-01 10:00:00.123Z",
      "updated": "2022-01-01 10:00:00.123Z"
    }
  ]
}
Fail 400
{
  "code": 400,
  "message": "error message"
}
©2025 Spell.im All Rights Reserved