Actions
CREATEMARKET
Creates a new market for the token pair.
This action is triggered by admin to create the market pair.
authority:
admin
requirements: none
args
{extended_symbol} bid_token
: extended symbol of the buy token to create token pair{extended_asset} ask_token
: extended asset of the sell token to create token pair{uint16_t} order_min
: min order to place{uint8_t} status_code
: status code of the market pair{uint64_t} ask_oracle_index
: index of the oracle to get price of token from feed
example
UPDATEMARKET
Update an exisitng market for status change or min order.
authority:
admin
requirements: market id should be existed for an update
args
{uint16_t} market_id
: id of the token pair to update{uint64_t} order_min
: min order to place{uint8_t} status_code
: status code of the market{uint64_t} ask_oracle_index
: index of the oracle to get price of token from feed
example
PLACEORDER
Creates a new order and place it into orderq or sltp table.
This action is triggered by any user who has sufficient funds to trade token pairs.
authority:
user
requirements: none
args
{uint16_t} market_id
: id of the token pair{name} account
: name of the account holder who would like to buy/sell{uint8_t} order_type
: type of order, LIMIT(1), STOPLOSS(2) or TAKEPROFIT(3){uint8_t} order_side
: indicates order side is BUY(1)/SELL(2){uint64_t} quantity
: quantity to be traded{uint64_t} price
: quoted price by the user{extended_symbol} bid_symbol
: extended symbol of the buy token from the market id(token pair){extended_symbol} ask_symbol
: extended symbol of the ask token from the market id(token pair)optional{uint64_t} trigger_price
: price at which order triggered from sltp to orderq, used for stoploss and takeprofit ordersoptional{uint8_t} fill_type
: fill type of the order, options are GTC(Good Till Expiry) EXPIRY), IOC(Immediate Or Cancel) and POST_ONLY(a limit order placed by a user will never match with any orders already on the book){name} referrer
: name of the referrer account(the referrer would get a share in fees)
example
PROCESS
This action is used to process the orders in the orderQ. It does apply to all orders irrespective of market-id's.
authority: user
requirements: none
args
{uint16_t} size
: size of the orders to process
example
PROCESSSLTP
This action is used to process the stoploss and takeprofit orders in the orderQ.
authority: user
requirements: none
args
{uint16_t} market_id
: process orders for specific market{uint16_t} size
: size(number) of the orders to process
example
CANCELORDER
This action is used to cancel orders that are queued in stoploss or orderq or orderbook.
authority: user
requirements: none
args
{name} account
: name of the account that order belongs to{uint64_t} order_id
: id of the order
example
PAUSEDEX
This action is used to pause and resume all activities/actions on DEX.
authority:
admin
requirements: none
args
{bool} status
: status to be updated
example
SETFEEACNT
All fees collected through DEX trading would be deposited into fee account. The fee account can be updated by admin.
authority:
admin
requirements: none
args
{name} account
: fee account to be updated
example
SETUSERTIER
Both maker and taker fees collected based on user acitivitiy on DEX. User tier would be calculated based on 30d average colume and it can be assigned through action by admin.
authority:
admin
requirements: none
args
{name} account
: fee account to be updated{uint8_t} tier
: tier value
example
Last updated