get order

API details

This API retrieves the detailed information of an order. Provide one of these identifiers:

  • orderId

  • clientOrderId (format: ${HIN}_${nonce}, e.g., 10001_123)

  • txHash

get order detail

get
Query parameters
OrderIdstring · stringoptional

order id

ClientOrderIdstringoptional

Client order id. Format: "${HIN}_${nonce}". Example: "10001_123"

TxHashstringoptional

tx hash

Responses
curl -L \
  --url 'https://testnetopenapi.hibit.app/v1/order'
{
  "code": 1,
  "message": "text",
  "data": {
    "id": "text",
    "mid": "text",
    "hin": "text",
    "cat": 0,
    "s": 1,
    "fv": "text",
    "fa": "text",
    "tv": "text",
    "ta": "text",
    "fp": "text",
    "p": "text",
    "st": 0,
    "t": null
  }
}

Code example

import { hibitClient } from '@delandlabs/hibit-client';

const options = {
  network: HibitNetwork.Testnet,
  hin: 10000n
};
hibitClient.setOptions(options);

const order = await hibitClient.getOrder({orderId:"12000027100000000000000000000003"});

SDK

Source code https://github.com/Deland-Labs/hibit-sdk

References

What is HIN?

How to Obtain your HIN and Proxy Key?

Last updated