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()

Last updated