Order Lifecycle
Belos is the script to fetch order lifecyle using ordinal order id
const fetch = require('node-fetch');
// for testnet use "https://dex.api.testnet.metalx.com/dex"
const url = "https://dex.api.mainnet.metalx.com/dex"
async function main() {
// Replace accordingly
const ORDINAL_ID = "81321dc485b5dd8053c4b7d0c90273ce72645b4127524d1745aebe8b4f795e21"
const path = "/v1/orders/lifecycle"
const response = await fetch(`${url}${path}?ordinal_order_id=${ORDINAL_ID}`);
const data = await response.json()
console.dir(data, { depth: null })
}
main()
import requests
# Supply ordinal order id
ORDINALID = '7c58750548702a4a8dc30aebe21fb1885923b7db42dbe81239f5a64e672b82d7'
url = f"https://dex.api.mainnet.metalx.com/dex/v1/orders/lifecycle?ordinal_order_id={ORDINALID}"
headers = {"accept": "application/json"}
response = requests.get(url, headers=headers)
print(response.json())
Last updated