API
Create an order
Contract struct
struct Order {
ActionType action; // Order action, 0 for OpenPosition, 1 for ReduceOnly
uint256 marketId; // See link above
/// @notice Use `amount` and `price` to control slippage
int256 amount; // Amount of base token, 18 decimals
uint256 price; // Order price, 18 decimals
uint256 expiry; // Expiry timestamp
TradeType tradeType; // Fill type, 0 for Fill or Kill, 1 for Partial Fill
address owner; // Order address (must be same as signer)
uint256 marginXCD; // Margin amount for the order, decimals match collateral
/// @notice `relayFee` is 0.10 USDT; in the future this fee will be queryable via API
uint256 relayFee; // Relayer fee, decimals match collateral
bytes32 id; // User generated; may not repeat
}API Endpoint
Request
Response
Cancel an order
API Endpoint
Examples
Create order
Cancel order
Last updated
Was this helpful?