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.

Evidence scope · implementation, public chain state, third-party reports, operator disclosures

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

TypeValues
OrderType0 LIMIT · 1 MARKET
AssetType0 HK · 1 US · 2 SG · 3 JP · 4 KR · 5 IPO · 6 OT
Stock amount8 decimals
USDT / price / interest6 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.