Coin Exchange

Cancel Coin Exchange

Cancel an existing coin exchange order.

Method: POST

https://ardr.nownodes.io/nxt?requestType=cancelCoinExchange

Example body (x-www-form-urlencoded)

requestType = cancelCoinExchange
secretPhrase = IWontTellYou
chain = 1
order = cancelCoinExchange
feeNQT = -1
deadline = 60

Example response: 200

{
    "errorDescription": "Unknown account",
    "errorCode": 5
}

Exchange Coins

Place an asset order.

Method: POST

https://ardr.nownodes.io/nxt?requestType=exchangeCoins

Example body (x-www-form-urlencoded)

requestType = cancelCoinExchange
secretPhrase = IWontTellYou
chain = 1
exchange = 2
quantityQNT = 100000000
priceNQTPerCoin = 100000000
feeNQT = -1
feeRateNQTPerFXT = -1

Example response: 200

{
    "errorDescription": "Unknown account",
    "errorCode": 5
}

Get Coin Exchange Order

Get a bid/ask coin exchange order given an order ID.

Method: GET

https://ardr.nownodes.io/nxt?requestType=getCoinExchangeOrder&order=12902733594079401676

Example response: 200

{
    "errorDescription": "Unknown order",
    "errorCode": 5
}

Get Coin Exchange Order Ids

Get a bid/ask coin exchange order Ids given an exchange, in order of decreasing bid price or increasing ask price.

Method: GET

https://ardr.nownodes.io/nxt?requestType=getCoinExchangeOrderIds&chain=1&exchange=2

Example response: 200

{
    "orderIds": [
        "11300273276130240374",
        "17416339367719739701",
        "4153308226254601525",
        "2371554106439690597",
        "8887264324757118718",
        "10277477408660232270",
        "7232733849391752156",
        "3133997986389415410",
        "10458969023599530720",
        "3211538861358625126",
        "10819284152695109583",
        "10009359773854210794",
        "2027192905314539272",
        "1768150152883377267",
        "14896819924275810276",
        "10176189787847684415",
        "11150200570498808003",
        "10262652108394368421",
        "148345670841682412",
        "2129328325183103425",
        "8406919829259521866",
        "16533912585841262765",
        "18209469042778597279",
        "10267511208165823498",
        "17453417174254842727",
        "13642849831703070622",
        "17065369134028988604",
        "9594361852165472840",
        "14668779191629834987",
        "4267942241820768429",
        "5640375102702529773",
        "18288776394575021628",
        "13293982190913578861",
        "15347914743926675016",
        "11536187138491140939",
        "14267968159324273333",
        "4445507134921415686",
        "8131055976199932530",
        "7927429934648473119",
        "9149139979402932171",
        "4369373418996009191",
        "8612056802256567433"
    ],
    "requestProcessingTime": 2
}

Get Coin Exchange Orders

Get bid/ask order IDs given an account or a chain/exchange pair.

Method: GET

https://ardr.nownodes.io/nxt?requestType=getCoinExchangeOrders&chain=2&exchange=1

Example response: 200

{
    "orders": [
        {
            "askNQTPerCoin": "5127679",
            "exchangeQNT": "190000073317",
            "quantityQNT": "9742594263",
            "chain": 2,
            "bidNQTPerCoin": "1950200000",
            "orderFullHash": "727bd9663c575039a06e766d309f40b5aa3acd08b6265b3d3328c97279c0025e",
            "accountRS": "ARDOR-YHJE-V87J-ZAHF-G7S8S",
            "exchange": 1,
            "account": "17013198449221254668",
            "order": "4129896775233928050"
        },
        {
            "askNQTPerCoin": "5128205",
            "exchangeQNT": "1959750000000",
            "quantityQNT": "100500000000",
            "chain": 2,
            "bidNQTPerCoin": "1950000000",
            "orderFullHash": "faf7f4a50bbda3cfb0b5c82440d2050b16a01231b9601b24e9dd08b50086e2cf",
            "accountRS": "ARDOR-YHJE-V87J-ZAHF-G7S8S",
            "exchange": 1,
            "account": "17013198449221254668",
            "order": "14962010244781504506"
        },
        {
            "askNQTPerCoin": "5263157",
            "exchangeQNT": "1909500000000",
            "quantityQNT": "100500000000",
            "chain": 2,
            "bidNQTPerCoin": "1900000000",
            "orderFullHash": "33ef493e363c195ada0c7aba274c451c1604156af9a371d80088c967d029486f",
            "accountRS": "ARDOR-YHJE-V87J-ZAHF-G7S8S",
            "exchange": 1,
            "account": "17013198449221254668",
            "order": "6492286541502213939"
        },
        {
            "askNQTPerCoin": "5405405",
            "exchangeQNT": "1859250000000",
            "quantityQNT": "100500000000",
            "chain": 2,
            "bidNQTPerCoin": "1850000000",
            "orderFullHash": "a88cf928819e345821c068960e761339f9ab411b084a3797f3937a8472eb69e8",
            "accountRS": "ARDOR-YHJE-V87J-ZAHF-G7S8S",
            "exchange": 1,
            "account": "17013198449221254668",
            "order": "6355879251702025384"
        },
        {
            "askNQTPerCoin": "5555555",
            "exchangeQNT": "1809000000000",
            "quantityQNT": "100500000000",
            "chain": 2,
            "bidNQTPerCoin": "1800000000",
            "orderFullHash": "e11629231c82824105bb53575a3fc09ac4ad2462469c1877d535b2ad68b124d4",
            "accountRS": "ARDOR-YHJE-V87J-ZAHF-G7S8S",
            "exchange": 1,
            "account": "17013198449221254668",
            "order": "4720478416798291681"
        },
        {
            "askNQTPerCoin": "5714285",
            "exchangeQNT": "1758750000000",
            "quantityQNT": "100500000000",
            "chain": 2,
            "bidNQTPerCoin": "1750000000",
            "orderFullHash": "cd56b29493f74d57192b80dd55848f137cca1da13b5b5f1b372b5cc12e2451ed",
            "accountRS": "ARDOR-YHJE-V87J-ZAHF-G7S8S",
            "exchange": 1,
            "account": "17013198449221254668",
            "order": "6290956467733419725"
        },
        {
            "askNQTPerCoin": "5882352",
            "exchangeQNT": "1708500000000",
            "quantityQNT": "100500000000",
            "chain": 2,
            "bidNQTPerCoin": "1700000000",
            "orderFullHash": "ac43d0674d80e5774215ac360ebef3636cccdca4a1395ba37ad9e23d82bce2dd",
            "accountRS": "ARDOR-YHJE-V87J-ZAHF-G7S8S",
            "exchange": 1,
            "account": "17013198449221254668",
            "order": "8639452530122703788"
        },
        {
            "askNQTPerCoin": "6000000",
            "exchangeQNT": "848333332994",
            "quantityQNT": "50900000000",
            "chain": 2,
            "bidNQTPerCoin": "1666666666",
            "orderFullHash": "bde5c48a4d01803d890dae0e341648babf4f541fceec8d9d87e746757a73b962",
            "accountRS": "ARDOR-QK3M-FKHR-KBF7-BAAAA",
            "exchange": 1,
            "account": "10673821853396190259",
            "order": "4431543465884837309"
        },
...

Get Coin Exchange Trade

Get an executed trade given the full hash of the bid/ask coin exchange.

Method: GET

https://ardr.nownodes.io/nxt?requestType=getCoinExchangeTrade&orderFullHash=514eea666beadb1b04ab7d32658c5701851aca7195612e968128d7e01617abdf&matchFullHash=962076f848d67c13825b33b0a569f8f8b18e12f49da7f95553f0442e66dd5f91

Example response: 200

{
    "errorDescription": "Unknown trade",
    "errorCode": 5
}

Get Coin Exchange Trades

Get all coin exchange trades already executed given an account, a chain/exchange or an order full hash.

Method: GET

https://ardr.nownodes.io/nxt?requestType=getCoinExchangeTrades&chain=1&exchange=2

Example response: 200

{
    "trades": [
        {
            "quantityQNT": "2000000000000",
            "chain": 1,
            "orderFullHash": "207caaa95eb5eb3f4d4a977607d519854e45e7711972e55fe99b007037275b78",
            "exchangeRate": "0.05000000",
            "accountRS": "ARDOR-YHJE-V87J-ZAHF-G7S8S",
            "exchange": 2,
            "block": "15541925454515036496",
            "matchFullHash": "f381083ed7cac266b03f8c18637b9d1bf786bc51c59c848b9f97dcd186eb64a7",
            "priceNQTPerCoin": "5000000",
            "account": "17013198449221254668",
            "height": 3343410,
            "timestamp": 197435240
        },
        {
            "quantityQNT": "181021602930",
            "chain": 1,
            "orderFullHash": "76279558aca2d29ccc902ba27ca2222b8af1ed15da2362d7ee07817fc72ce8ce",
            "exchangeRate": "0.04760000",
            "accountRS": "ARDOR-SV3F-Y696-PZ4G-3NDEL",
            "exchange": 2,
            "block": "16974860095342609988",
            "matchFullHash": "8a8acd2b406c7fa8cdcdfb588bd780f168d63757fccfcb4241e4d2aad8d7dd58",
            "priceNQTPerCoin": "4760000",
            "account": "1815360703482850349",
            "height": 3343168,
            "timestamp": 197420714
        },
        {
            "quantityQNT": "602941176432",
            "chain": 1,
            "orderFullHash": "76279558aca2d29ccc902ba27ca2222b8af1ed15da2362d7ee07817fc72ce8ce",
            "exchangeRate": "0.04760000",
            "accountRS": "ARDOR-SV3F-Y696-PZ4G-3NDEL",
            "exchange": 2,
            "block": "11582543631345464368",
            "matchFullHash": "1359ce0f359a0acb58fe39426d54865b576190e3eb8f49e76dcd975774361c55",
            "priceNQTPerCoin": "4760000",
            "account": "1815360703482850349",
            "height": 3342039,
            "timestamp": 197353447
        },
        {
            "quantityQNT": "1261564339200",
            "chain": 1,
            "orderFullHash": "352196146144b3f1ad7e105a78f275ac8ae12c1d7e3b0e1b94fae6e987ee58b2",
            "exchangeRate": "0.04756000",
            "accountRS": "ARDOR-YHJE-V87J-ZAHF-G7S8S",
            "exchange": 2,
            "block": "6244789279388721809",
            "matchFullHash": "3212f17a8c222ea4241b900cc3423665a2f8c5f0a5ef299c640d092ba0fdadaa",
            "priceNQTPerCoin": "4756000",
            "account": "17013198449221254668",
            "height": 3340827,
            "timestamp": 197282876
        },
        {
            "quantityQNT": "1769951000000",
            "chain": 1,
            "orderFullHash": "c05414af255db744e8c888d40841b75a40c069901642cf6dcaa6cc6371828c3a",
            "exchangeRate": "0.05127679",
            "accountRS": "ARDOR-SV3F-Y696-PZ4G-3NDEL",
            "exchange": 2,
            "block": "13615661452537869114",
            "matchFullHash": "727bd9663c575039a06e766d309f40b5aa3acd08b6265b3d3328c97279c0025e",
            "priceNQTPerCoin": "5127679",
            "account": "1815360703482850349",
            "height": 3340461,
            "timestamp": 197261398
        },
        {
            "quantityQNT": "814000000000",
            "chain": 1,
            "orderFullHash": "c05414af255db744e8c888d40841b75a40c069901642cf6dcaa6cc6371828c3a",
            "exchangeRate": "0.05000000",
            "accountRS": "ARDOR-SV3F-Y696-PZ4G-3NDEL",
            "exchange": 2,
            "block": "13615661452537869114",
            "matchFullHash": "c7953f8fc2d5e45b8033b9a4ae00216cf8b4d82b6672d988d57b0b25f0490a91",
            "priceNQTPerCoin": "5000000",
            "account": "1815360703482850349",
            "height": 3340461,
            "timestamp": 197261398
        },
...

Get Expected Coin Exchange Order Cancellations

Get the expected coin exchange order cancellations for a specific chain. Since version 2.3.0e it returns both bundled and non-bundled transactions.

Method: GET

https://ardr.nownodes.io/nxt?requestType=getExpectedCoinExchangeOrderCancellations&chain=2&

Example response: 200

{
    "orderCancellations": [],
    "requestProcessingTime": 2
}

Get Expected Coin Exchange Orders

Get the expected coin exchange orders to be completed for a specific chain/exchange or an account. Since version 2.3.0e it returns both bundled and non-bundled transactions.

Method: GET

https://ardr.nownodes.io/nxt?requestType=getExpectedCoinExchangeOrders&chain=2&exchange=1

Example response: 200

{
    "orders": [],
    "requestProcessingTime": 4
}

Simulate Coin Exchange

Simulate a coin exchange given a chain, exchange, quantity and a price per coin.

Method: GET

https://ardr.nownodes.io/nxt?requestType=simulateCoinExchange&chain=1&exchange=2&quantityQNT=1000000&priceNQTPerCoin=2000000

Example response: 200

{
    "askNQTPerCoin": 5000000000,
    "quantityQNT": 1000000,
    "bidNQTPerCoin": 2000000,
    "requestProcessingTime": 0
}

Last updated