# DexTrade

# ABI

The built-in dex trade contract. Contract address is vite_00000000000000000000000000000000000000079710f19dc7

# CancelOrder

ABI definition

Copy { "type": "function", "name": "DexTradeCancelOrder", "inputs": [ { "name": "orderId", "type": "bytes" } ] }

Inputs

Input item Name Data type source comment
AccountAddress new order owner Address sendBlock
orderId - bytes ABI

# RPC interface

Supported protocol:

JSON-RPC 2.0 HTTP IPC Publish–subscribe Websocket
future version

# dextrade_getOrderById

query order detail by order Id

  • Parameters:

    • orderId: base64 encoded orderId
  • Returns:

    • Order:order detail
  • Example:

# dextrade_getOrdersFromMarket

query open orders from one trade pair, return orders will list by sequence which they will be matched

  • Parameters:

    • tradeToken: trade token of trade pair
    • quoteToken: quote token of trade pair
    • side: buy/sell trade token for order, false buy, true sell
    • begin: begin index, start from 0
    • end: end index
  • Returns:

    • []Order:open order list
  • Example: