API
API for Ethereum Wallets
This section explains how to interact with the bigshortbets P2P Futures Market using Ethereum wallets.
Function Reference
create_orderCreates a new order.
Parameters:
market (uint64): Market ID.price (uint256): Price of the order.quantity (uint32): Quantity of the order.order_side (OrderSide): Indicates whether the order isLongorShort.(Optional)
margin (uint8): Margin percentage.
cancel_orderCancels an existing order and unlocks the reserved funds.
Parameters:
market (uint64): Market ID.order_id (uint64): ID of the order to cancel.
close_positionPlaces a closing order for the position with the specified ID.
Parameters:
market (uint64): Market ID.position_id (uint64): ID of the position for which a closing order will be created.price (uint256): Price of the closing order.quantity (uint32): Quantity to close.
depositAdds funds to the selected market margin.
Parameters:
market (uint64): Market ID.amount (uint256): Amount of funds to add.
withdrawWithdraws a specified amount of excess funds from the margin of the selected market.
Parameters:
market (uint64): Market ID.amount (uint256): Amount to withdraw.
withdraw_allWithdraws all excess funds from the margin of the selected market.
Parameters:
market (uint64): Market ID.
Last updated
Was this helpful?