API Reference

Understanding the distinction between orders and trades is crucial for effective trading on our decentralized exchange.

Orders

  • Definition: An order is a user's instruction to buy or sell a specific amount of an asset at a certain price.
  • Full Amount: Represents the total quantity the user wants to trade.
  • User-initiated: Placed by users and can remain open until fully executed or cancelled.
  • Example: Placing an order to buy 100 tokens at $10 each.

Trades

  • Definition: A trade is the execution of a transaction when a buy order matches with a sell order.
  • Partial Fulfillment: One order can be broken down into multiple trades.
  • Execution: Occurs when parts of an order are matched with counter-orders.
  • Example: An order to buy 100 tokens at $10 each could be fulfilled by two trades—one for 60 tokens and another for 40 tokens.

Key Differences
Quantity:

  • Order: Total amount the user wants to trade.
  • Trade: Actual amount exchanged in each transaction.

Process:

  • Order: User-initiated and may involve multiple trades.
  • Trade: Execution of parts of an order.

In summary, orders represent your trading intentions, while trades are the actual transactions fulfilling those intentions.