Skip to main content
Version: testnet (v0.74)

Estimate margin

GET 

/api/v2/estimate/margin

Estimate the margin that would be required for submitting this order

Request

Query Parameters

    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.

    • SIDE_UNSPECIFIED: Default value, always invalid
    • SIDE_BUY: Buy order
    • SIDE_SELL: Sell order
    type string

    Possible values: [TYPE_UNSPECIFIED, TYPE_LIMIT, TYPE_MARKET, TYPE_NETWORK]

    Default value: TYPE_UNSPECIFIED

    Type of the 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)
    size uint64required

    Size of order.

    price stringrequired

    Price of the asset.

Responses

A successful response.

Schema
    marginLevels object

    Summary of the estimated margins for this order if it were to trade now.

    asset string

    Asset ID for which the margin levels apply.

    collateralReleaseLevel string

    Collateral release level value. This field is an unsigned integer scaled to the asset's decimal places.

    initialMargin string

    Initial margin value. This field is an unsigned integer scaled to the asset's decimal places.

    maintenanceMargin string

    Maintenance margin value. This field is an unsigned integer scaled to the asset's decimal places.

    marginFactor string

    Margin factor, relevant only for isolated margin, 0 otherwise.

    marginMode - MARGIN_MODE_UNSPECIFIED: Never valid. - MARGIN_MODE_CROSS_MARGIN: Cross margin mode - margin is dynamically acquired and released as a position is marked to market - MARGIN_MODE_ISOLATED_MARGIN: Isolated margin mode - margin for any newly opened position volume is transferred to the margin account when the trade is executed

    Possible values: [MARGIN_MODE_UNSPECIFIED, MARGIN_MODE_CROSS_MARGIN, MARGIN_MODE_ISOLATED_MARGIN]

    Default value: MARGIN_MODE_UNSPECIFIED

    Margin mode for the party, cross margin or isolated margin.

    marketId string

    Market ID for which the margin levels apply.

    orderMargin string

    Margin required to cover orders in isolated margin mode.

    partyId string

    Party ID for whom the margin levels apply.

    searchLevel string

    Margin search level value. This field is an unsigned integer scaled to the asset's decimal places.

    timestamp int64

    Timestamp in Unix nanoseconds for when the ledger entry was created.

Loading...