Interact with the contract directly
For 1001x
struct LeverageMargin {
uint256 notionalUsd;
uint16 tier;
uint16 maxLeverage;
uint16 initialLostP; // 1e4
uint16 liqLostP; // 1e4
}
struct SlippageConfig {
string name;
uint256 onePercentDepthAboveUsd;
uint256 onePercentDepthBelowUsd;
uint16 slippageLongP; // 1e4
uint16 slippageShortP; // 1e4
uint16 index;
ISlippageManager.SlippageType slippageType;
bool enable;
}
struct FeeConfig {
string name;
uint16 index;
uint16 openFeeP; // 1e4
uint16 closeFeeP; // 1e4
bool enable;
uint24 shareP; // 1e5
uint24 minCloseFeeP; // 1e5
}
struct PairView {
// BTC/USD
string name;
// BTC address
address base;
uint16 basePosition;
PairType pairType;
PairStatus status;
uint256 maxLongOiUsd;
uint256 maxShortOiUsd;
uint256 fundingFeePerBlockP; // 1e18
uint256 minFundingFeeR; // 1e18
uint256 maxFundingFeeR; // 1e18
LibPairsManager.LeverageMargin[] leverageMargins;
uint16 slippageConfigIndex;
uint16 slippagePosition;
LibPairsManager.SlippageConfig slippageConfig;
uint16 feeConfigIndex;
uint16 feePosition;
LibFeeManager.FeeConfig feeConfig;
uint40 longHoldingFeeRate; // 1e12
uint40 shortHoldingFeeRate; // 1e12
}1. How to open a position at the opening price
2. How to place a limit order
3. How to check a user’s position information
4. How to check an open order
5. How to close a position
6. How to add margin
7. How to adjust Take Profit and Stop Loss price
8. How to cancel the Limit order
Resources
Last updated
