Estimate margin
GEThttps://croissant.network/api/v2/estimate/margin
Estimate the margin that would be required for submitting this order
Request
Query Parameters
- SIDE_UNSPECIFIED: Default value, always invalid
- SIDE_BUY: Buy order
- SIDE_SELL: Sell order
- TYPE_UNSPECIFIED: Default value, always invalid
- TYPE_LIMIT: Used for Limit orders
- TYPE_MARKET: Used for Market orders
- TYPE_NETWORK: Used for orders where the initiating party is the network (with distressed parties)
marketId stringrequired
Market ID for the order.
partyId stringrequired
Party ID of the order.
side string
Possible values: [SIDE_UNSPECIFIED
, SIDE_BUY
, SIDE_SELL
]
Default value: SIDE_UNSPECIFIED
Order side - indicator for Seller or Buyer side.
type string
Possible values: [TYPE_UNSPECIFIED
, TYPE_LIMIT
, TYPE_MARKET
, TYPE_NETWORK
]
Default value: TYPE_UNSPECIFIED
Type of the order.
size uint64required
Size of order.
price stringrequired
Price of the asset.
Responses
- 200
- 500
- default
A successful response.
- application/json
- Schema
- Example (from schema)
Schema
marginLevels object
{
"marginLevels": {
"asset": "string",
"collateralReleaseLevel": "string",
"initialMargin": "string",
"maintenanceMargin": "string",
"marginFactor": "string",
"marginMode": "MARGIN_MODE_UNSPECIFIED",
"marketId": "string",
"orderMargin": "string",
"partyId": "string",
"searchLevel": "string",
"timestamp": "string"
}
}
An internal server error
- application/json
- Schema
- Example (from schema)
Schema
code int32
details object[]
message string
{
"code": 0,
"details": [
{
"@type": "string"
}
],
"message": "string"
}
An unexpected error response.
- application/json
- Schema
- Example (from schema)
Schema
code int32
details object[]
message string
{
"code": 0,
"details": [
{
"@type": "string"
}
],
"message": "string"
}
- curl
- python
- go
- nodejs
- CURL
curl -L -X GET 'https://croissant.network/api/v2/estimate/margin' \
-H 'Accept: application/json'
ResponseClear