Tradable product pairs are returned by List Products. This endpoint’s response includes all enabled products for a given portfolio, along with crucial details such as minimum/maximum order increments and order book precision. This can be used to validate order parameters, ensure compliance with product constraints, and power trading interfaces or workflows.
To learn more about this SDK, please visit the Prime Java SDK.
Trading via the Prime REST API is conducted through the Create Order endpoint. When an order is created, the product (for example, BTC-USD
) and the portfolio ID must be specified. The portfolio ID determines which trading balance will be used for debits and credits, and can be obtained from List Portfolios or from the URL of the Prime web UI.
Any order algorithm supported in the Prime UI is also available through the Create Order API. Prime supports specifying orders in both base units (e.g., “10 ETH”) and quote units (e.g., “100,000 USD of ETH”).
To learn more about this SDK, please visit the Prime Java SDK.
An Order Preview can also be submitted, which is useful in scenarios where a preview screen is needed, or to obtain a general idea of trading conditions. This is not a hold.
When an order is successfully created, the API returns an order ID. This ID can be used to check the current status or attempt to cancel the order.
There are multiple ways to track order status:
Examples of using Get Order by ID are shown below.
To learn more about this SDK, please visit the Prime Java SDK.
An order can be split into multiple fills. Each fill contains specific details, such as venue that executed the fill. These fills are all tied to the same order ID.
Examples of using list Order Fills are shown below.
To learn more about this SDK, please visit the Prime Java SDK.
If an order is still open, a cancellation may be attempted via Cancel Order. Note that a cancellation request does not guarantee a successful cancellation because the order status could change at any time (e.g., it may fill before the cancel request is processed).
To learn more about this SDK, please visit the Prime Java SDK.
Please note: All requests discussed above require proper authentication. For more information, visit REST API Authentication.