(optional) only required for wrting operations
(optional) address of the current user (default: DUMMY_ADDRESS)
(optional) only required for wrting operations
(optional) address of the current user (default: DUMMY_ADDRESS)
connection to fullnode
@description: batch cancel order
Object id of pool, created after invoking createPool, eg: "0xcaee8e1c046b58e55196105f1436a2337dcaa0c340a7a8c8baf65e4afb8823a4"
array of order ids you want to cancel, you can find your open orders by query.list_open_orders eg: ["0", "1", "2"]
@description: Cancel all limit orders under a certain account capacity
Object id of pool, created after invoking createPool, eg: "0xcaee8e1c046b58e55196105f1436a2337dcaa0c340a7a8c8baf65e4afb8823a4"
@description: cancel an order
Object id of pool, created after invoking createPool, eg: "0xcaee8e1c046b58e55196105f1436a2337dcaa0c340a7a8c8baf65e4afb8823a4"
orderId of a limit order, you can find them through function query.list_open_orders eg: "0"
Object id of pool, created after invoking createPool, eg: "0xcaee8e1c046b58e55196105f1436a2337dcaa0c340a7a8c8baf65e4afb8823a4"
array of expired order ids to clean, eg: ["0", "1", "2"]
array of Order owners, should be the owner addresses from the account capacities which placed the orders
@description: Create and Transfer custodian account to user
current address of the user
@description: Create Account Cap
@description: Create and Transfer custodian account to user
@description: Create pool for trading pair
Full coin type of the base asset, eg: "0x3d0d0ce17dcd3b40c2d839d96ce66871ffb40e1154a8dd99af72292b3d10d7fc::wbtc::WBTC"
Full coin type of quote asset, eg: "0x3d0d0ce17dcd3b40c2d839d96ce66871ffb40e1154a8dd99af72292b3d10d7fc::usdt::USDT"
Minimal Price Change Accuracy of this pool, eg: 10000000. The number must be an interger float scaled by FLOAT_SCALING_FACTOR
.
Minimal Lot Change Accuracy of this pool, eg: 10000.
Customized taker fee rate, float scaled by FLOAT_SCALING_FACTOR
, Taker_fee_rate of 0.25% should be 2_500_000 for example
Customized maker rebate rate, float scaled by FLOAT_SCALING_FACTOR
, should be less than or equal to the taker_rebate_rate
@description: Create pool for trading pair
Full coin type of the base asset, eg: "0x3d0d0ce17dcd3b40c2d839d96ce66871ffb40e1154a8dd99af72292b3d10d7fc::wbtc::WBTC"
Full coin type of quote asset, eg: "0x3d0d0ce17dcd3b40c2d839d96ce66871ffb40e1154a8dd99af72292b3d10d7fc::usdt::USDT"
Minimal Price Change Accuracy of this pool, eg: 10000000. The number must be an integer float scaled by FLOAT_SCALING_FACTOR
.
Minimal Lot Change Accuracy of this pool, eg: 10000.
the pool id for the deposit
the coin used for the deposit. You can omit this argument if you are depositing SUI, in which case gas coin will be used
the pool id, eg: 0xcaee8e1c046b58e55196105f1436a2337dcaa0c340a7a8c8baf65e4afb8823a4
lower price you want to query in the level2 book, eg: 18000000000. The number must be an integer float scaled by FLOAT_SCALING_FACTOR
.
higher price you want to query in the level2 book, eg: 20000000000. The number must be an integer float scaled by FLOAT_SCALING_FACTOR
.
{ 'bid' | 'ask' | 'both' } bid or ask or both sides.
@description: get the base and quote token in custodian account
the pool id, eg: 0xcaee8e1c046b58e55196105f1436a2337dcaa0c340a7a8c8baf65e4afb8823a4
your accountCap, eg: 0x6f699fef193723277559c8f499ca3706121a65ac96d273151b8e52deb29135d3. If not provided, this.accountCap
will be used.
the pool id, eg: 0xcaee8e1c046b58e55196105f1436a2337dcaa0c340a7a8c8baf65e4afb8823a4
your accountCap, eg: 0x6f699fef193723277559c8f499ca3706121a65ac96d273151b8e52deb29135d3. If not provided, this.accountCap
will be used.
@description: place a limit order
Object id of pool, created after invoking createPool, eg: "0xcaee8e1c046b58e55196105f1436a2337dcaa0c340a7a8c8baf65e4afb8823a4"
restrictions on limit orders, explain in doc for more details, eg: 0
a client side defined order number for bookkeeping purpose, e.g., "1", "2", etc. If omitted, the sdk will assign a increasing number starting from 0. But this number might be duplicated if you are using multiple sdk instances
@description: place a market order
Object id of pool, created after invoking createPool, eg: "0xcaee8e1c046b58e55196105f1436a2337dcaa0c340a7a8c8baf65e4afb8823a4"
Amount of quote asset to swap in base asset
bid for buying base with quote, ask for selling base for quote
the objectId or the coin object of the base coin
the objectId or the coin object of the quote coin
a client side defined order id for bookkeeping purpose. eg: "1" , "2", ... If omitted, the sdk will assign an increasing number starting from 0. But this number might be duplicated if you are using multiple sdk instances
the address to receive the swapped asset. If omitted, this.currentAddress
will be used. The function
Object id of pool, created after invoking createPool, eg: "0xcaee8e1c046b58e55196105f1436a2337dcaa0c340a7a8c8baf65e4afb8823a4"
Object id of the token to swap: eg: "0x6e566fec4c388eeb78a7dab832c9f0212eb2ac7e8699500e203def5b41b9c70d"
amount of token to buy or sell, eg: 10000000
current user address, eg: "0xbddc9d4961b46a130c2e1f38585bbc6fa8077ce54bcb206b26874ac08d607966"
a client side defined order number for bookkeeping purpose. eg: "1" , "2", ...
@description: swap exact quote for base
Object id of pool, created after invoking createPool, eg: "0xcaee8e1c046b58e55196105f1436a2337dcaa0c340a7a8c8baf65e4afb8823a4"
Object id of the token to swap: eg: "0x6e566fec4c388eeb78a7dab832c9f0212eb2ac7e8699500e203def5b41b9c70d"
amount of token to buy or sell, eg: 10000000.
current user address, eg: "0xbddc9d4961b46a130c2e1f38585bbc6fa8077ce54bcb206b26874ac08d607966"
Optional
clientOrderId: stringa client side defined order id for bookkeeping purpose, eg: "1" , "2", ... If omitted, the sdk will assign an increasing number starting from 0. But this number might be duplicated if you are using multiple sdk instances
the pool id for the withdraw
Base or Quote
the address to receive the withdrawn asset. If omitted, this.currentAddress
will be used. The function
will throw if the recipientAddress === DUMMY_ADDRESS
connection to fullnode