Developers / 03
Contract and ABI reference
Use the active proxy with the ABI below. Order quantity uses 8 decimals; settlement price, fees and interest use 6 decimals.
Downloads
StockTrading.json · StockTokenFactory.json · StandardStockToken.json
Current order signatures
function createBuyOrder( string _stockSymbol, OrderType _orderType, uint256 _amount, uint256 _price, uint256 _expiresAt, uint256 _marginLevel, uint256 _interest, AssetType _assetType ) returns (uint256 orderId) function createSellOrder( string _stockSymbol, OrderType _orderType, uint256 _amount, uint256 _price, uint256 _expiresAt, uint256 _marginLevel, uint256 _interest, AssetType _assetType ) returns (uint256 orderId)
Enums and precision
| Type | Values |
|---|---|
OrderType | 0 LIMIT · 1 MARKET |
AssetType | 0 HK · 1 US · 2 SG · 3 JP · 4 KR · 5 IPO · 6 OT |
| Stock amount | 8 decimals |
| USDT / price / interest | 6 decimals |
Events
OrderCreated, OrderFilled, OrderCancelled, USDTTransferred, StockTokenTransferred, FeeCharged, StockTokensMinted and StockTokensBurned.
Version correction. Older five-argument examples do not match the current inspected implementation. This page uses the eight-argument signature.