Skip to navigation

Position builder

Calculate the portfolio margin information for virtual (simulated) positions and/or existing positions, only applicable to portfolio margin accounts.

Authentication

OK-ACCESS-KEYstring
Your API key.
OK-ACCESS-SIGNstring

Base64-encoded HMAC-SHA256 signature of the prehash string.

OK-ACCESS-TIMESTAMPstring

ISO 8601 UTC timestamp, e.g. 2020-12-08T09:08:57.715Z.

OK-ACCESS-PASSPHRASEstring
The passphrase you set when creating the API key.

Request

This endpoint expects an object.
acctLvstringOptional
Account level for the simulation.
inclRealPosAndEqbooleanOptional
Whether to include existing positions and account balance. Default true.
leverstringOptional
Leverage used for the simulation.
greeksTypeenumOptional
Greeks type.
Allowed values:
simPoslist of objectsOptional
List of simulated positions.
simAssetlist of objectsOptional
List of simulated assets.
idxVolstringOptional
Volatility of the index used in the simulation.

Response

Successful response
codestringOptional

Result code. 0 means success; any other value is an error code.

msgstringOptional
Error message. Empty on success.
datalist of objectsOptional