Interact with the contract directly
For Simple mode
Some users interact directly with the contract for full control, automation, or when the app interface is unavailable or limited.
How to get trading pair information
Contract address: 0x1b6f2d3844c6ae7d56ceb3c3643b9060ba28feb0
Method: ParisV3
Response:
1. How to open a position at the opening price
Contract address: 0x1b6f2d3844c6ae7d56ceb3c3643b9060ba28feb0
Method: openMarketTrade
Parameters: data (tuple) Tuple: A tuple is an array of values e.g. [ "0x4sd…","100","100"..]. It can contain strings, integers, and boolean values. The structure for this tuple is:
Example: If the user wants to use 100 USDT to place a pending order for a BTC Long position with Price 20000, Quantity 0.001, Take Profit Price 25000, and Stop Poss price 19000, the inPutData should be:["0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c","True","0x55d398326f99059fF775485246999027B3197955","100000000000000000000","10000000",,"2000000000000"2500000000000","1900000000000",1]
2. How to place a limit order
Contract address: 0x1b6f2d3844c6ae7d56ceb3c3643b9060ba28feb0
Method: createLimitOrder(
Parameters: data (tuple)
3. How to check a user’s position information
4. How to check an open order
Contract address: 0x1b6f2d3844c6ae7d56ceb3c3643b9060ba28feb0
Method: getLimitOrders
Parameters:
User: address
Pairs: 0x0000000000000000000000000000000000000000
Response:
5. How to close a position
Contract address: 0x1b6f2d3844c6ae7d56ceb3c3643b9060ba28feb0
Method: closeTrade
Parameters:
6. How to add margin
Contract address: 0x1b6f2d3844c6ae7d56ceb3c3643b9060ba28feb0
Method: addMargin
Parameters:
7. How to adjust Take Profit and Stop Loss price
Contract address: 0x1b6f2d3844c6ae7d56ceb3c3643b9060ba28feb0
Method: updateTradeTpAndSl
Parameters:
8. How to cancel the Limit order
Contract address: 0x1b6f2d3844c6ae7d56ceb3c3643b9060ba28feb0
Method: cancelLimitOrder
Parameters:
Margin amount decimals:
USDT: 1e18
USDC: 1e18
Price decimal: 1e8
Contract qty decimal: 1e10
Resources
ABI:
Last updated