get https://api.staging.rysk.finance/v1/positionRisk
Signature genration
{
EIP712Domain: {
{
name: 'name', // rysk
type: 'string',
},
{
name: 'version', // "0.0.0"
type: 'string',
},
{
name: 'chainId',
type: 'uint256',
},
{
name: 'verifyingContract', // <OrderDispatchAddress>
type: 'address',
},
},
SignedAuthentication: {
{
name: "account",
type: "address",
},
{
name: "subAccountId",
type: "uint8",
},
},
}
Example response:
{
"account": "0x123", // Address of the account holding the position
"subAccountId": 0, // Identifier for the subaccount
"productId": 1002, // Identifier for the product
"productSymbol": "ethperp", // Symbol of the product
"quantity": "10000000000000000000000", // Quantity of the product held in e18 decimals
"avgEntryPrice": "2000000000000000000000", // Average entry price of the position in e18 decimals
"initCumFunding": "50000000000000000000", // Initial cumulative funding in e18 decimals
"pnl": "300000000000000000000", // Profit and Loss of the position in e18 decimals
"margin": "1000000000000000000000", // Margin held for the position in e18 decimals
"liquidationPrice": "1500000000000000000000", // Liquidation price of the position in e18 decimals
"accruedFunding": "10000000000000000000", // Accrued funding in e18 decimals
"markPrice": "2100000000000000000000", // Mark price of the product in e18 decimals
"currentCumFunding": "70000000000000000000" // Current cumulative funding in e18 decimals
}