Increase Position Margin

POST /fund

Assign additional margin to a position, decreasing the leverage. Only relevant for Isolated Margin users.

application/x-www-form-urlencoded

Body Required

  • pair string Required

    Market of position (e.g. "USD_BTCCALL_PERP")

  • qty number Required

    Amount of additional margin to assign (denominated in USD)

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • code integer

      Response code

    • msg string

      Diagnostic message

    • result object

      Request result

      Hide result attributes Show result attributes object
      • balances object

        Account balances

        Hide balances attribute Show balances attribute object
        • ETH object

          ETH balance

          Hide ETH attributes Show ETH attributes object
          • free number

            Available ETH balance

          • locked number

            ETH balance in use for open orders

          • ETH balance in use for pending withdrawals

          • pnl number

            ETH P&L. This number is updated every time you close an ETH-related position.

          • margin number

            ETH position margin.

          • fees number

            Fees paid since account creation.

      • Account positions

        Hide positions attribute Show positions attribute object
        • Market of position

          Hide USD_BTCCALL_PERP attributes Show USD_BTCCALL_PERP attributes object
  • 503 application/json

    Error

    Hide response attributes Show response attributes object
POST /fund
curl \
 -X POST https://api.testnet.everstrike.io/fund \
 -H "x-api-key: $API_KEY" \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -d 'pair=string&qty=42.0'
Response examples (200)
{
  "code": 200,
  "msg": "null",
  "result": {
    "balances": {
      "BTC": {
        "free": 21,
        "locked": 2,
        "withdrawn": 0
      }
    },
    "positions": {
      "USD_BTCCALL_PERP": {
        "free": 1,
        "size": 1,
        "stats": {
          "lp": 3.7,
          "pnl": 0,
          "roe": 0,
          "mark": 2.1,
          "size": 1,
          "equity": 1,
          "margin": 1,
          "bankrupt": 3.78,
          "leverage": 2.82,
          "notional": 0.14,
          "avg_entry": 3.4,
          "direction": "BUY"
        },
        "locked": 0,
        "realized": 0
      }
    }
  }
}
Response examples (503)
{
  "code": 503,
  "msg": "Invalid request",
  "result": {}
}