Orderly Network private API

The private API from Orderly Network — 137 operation(s) for private.

OpenAPI Specification

orderly-network-private-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: EVM admin private API
  description: ''
  version: 1.0.0
servers:
- url: https://api.orderly.org
  description: Mainnet
- url: https://testnet-api.orderly.org
  description: Testnet
tags:
- name: private
paths:
  /v1/client/add_sub_account:
    post:
      summary: Add sub account
      description: '**Limit: 10 requests per second**


        `POST /v1/client/add_sub_account`


        Only the main account is allowed to call this API.


        Main account’s Orderly key can control sub accounts.

        '
      tags:
      - private
      parameters:
      - $ref: '#/components/parameters/orderly_timestamp'
      - $ref: '#/components/parameters/orderly_account_id'
      - $ref: '#/components/parameters/orderly_key'
      - $ref: '#/components/parameters/orderly_signature'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                description:
                  type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddSubAccountResponse'
  /v1/client/sub_account:
    get:
      summary: Get sub account list
      description: '**Limit: 10 requests per second**


        `GET /v1/client/sub_account`


        Only the main account is allowed to call this API.

        '
      tags:
      - private
      parameters:
      - $ref: '#/components/parameters/orderly_timestamp'
      - $ref: '#/components/parameters/orderly_account_id'
      - $ref: '#/components/parameters/orderly_key'
      - $ref: '#/components/parameters/orderly_signature'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubAccountResponse'
  /v1/client/update_sub_account:
    post:
      summary: Update sub account
      description: '**Limit: 10 requests per second**


        `POST /v1/client/update_sub_account`


        Only the main account is allowed to call this API.

        '
      tags:
      - private
      parameters:
      - $ref: '#/components/parameters/orderly_timestamp'
      - $ref: '#/components/parameters/orderly_account_id'
      - $ref: '#/components/parameters/orderly_key'
      - $ref: '#/components/parameters/orderly_signature'
      requestBody:
        content:
          application/json:
            schema:
              required:
              - sub_account_id
              type: object
              properties:
                sub_account_id:
                  type: string
                description:
                  type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicResponse'
  /v1/client/aggregate/positions:
    get:
      summary: Get aggregate positions
      description: '

        **Limit: 1 request per 60 seconds**


        `GET /v1/client/aggregate/positions`


        Only the main account is allowed to call this API.

        '
      tags:
      - private
      parameters:
      - $ref: '#/components/parameters/orderly_timestamp'
      - $ref: '#/components/parameters/orderly_account_id'
      - $ref: '#/components/parameters/orderly_key'
      - $ref: '#/components/parameters/orderly_signature'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AggregatePositionsResponse'
  /v1/client/aggregate/holding:
    get:
      summary: Get aggregate holding
      description: '

        **Limit: 1 request per 60 seconds**


        `GET /v1/client/aggregate/holding`


        Only the main account is allowed to call this API.

        '
      tags:
      - private
      parameters:
      - $ref: '#/components/parameters/orderly_timestamp'
      - $ref: '#/components/parameters/orderly_account_id'
      - $ref: '#/components/parameters/orderly_key'
      - $ref: '#/components/parameters/orderly_signature'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AggregateHoldingResponse'
  /v1/sub_account_settle_pnl:
    post:
      summary: Settle sub account PnL
      description: '**Limit: 10 requests per second**


        `POST /v1/sub_account_settle_pnl`


        Main account’s Orderly key can control sub accounts.

        '
      tags:
      - private
      parameters:
      - $ref: '#/components/parameters/orderly_timestamp'
      - name: orderly_account_id
        in: header
        description: account_id in header can only be sub_account
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/orderly_key'
      - $ref: '#/components/parameters/orderly_signature'
      requestBody:
        content:
          application/json:
            schema:
              required:
              - settle_nonce
              type: object
              properties:
                settle_nonce:
                  type: number
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SettlePnlResponse'
  /v1/positions:
    get:
      summary: Get all positions info
      deprecated: false
      description: '**Limit: 30 requests per 10 second per user**


        `GET /v1/positions`

        '
      tags:
      - private
      parameters:
      - $ref: '#/components/parameters/orderly_timestamp'
      - $ref: '#/components/parameters/orderly_account_id'
      - $ref: '#/components/parameters/orderly_key'
      - $ref: '#/components/parameters/orderly_signature'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PositionsResponse'
  /v1/positions_lite:
    get:
      summary: Get lite positions info
      deprecated: false
      description: '**Limit: 10 requests per 1 second**


        `GET /v1/positions_lite`


        Get lightweight positions information.

        '
      tags:
      - private
      parameters:
      - $ref: '#/components/parameters/orderly_timestamp'
      - $ref: '#/components/parameters/orderly_account_id'
      - $ref: '#/components/parameters/orderly_key'
      - $ref: '#/components/parameters/orderly_signature'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PositionsLiteResponse'
  /v1/position/{symbol}:
    get:
      summary: Get one position info
      deprecated: false
      description: '**Limit: 30 requests per 10 second per user**


        `GET /v1/position/{symbol}`

        '
      tags:
      - private
      parameters:
      - name: symbol
        in: path
        description: ''
        required: true
        schema:
          type: string
      - name: margin_mode
        in: query
        description: 'Default: `CROSS`. Supported values: `CROSS`/`ISOLATED`'
        required: false
        schema:
          type: string
          enum:
          - CROSS
          - ISOLATED
      - $ref: '#/components/parameters/orderly_timestamp'
      - $ref: '#/components/parameters/orderly_account_id'
      - $ref: '#/components/parameters/orderly_key'
      - $ref: '#/components/parameters/orderly_signature'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PositionResponse'
  /v1/position_history:
    get:
      summary: Get position history
      deprecated: false
      description: '**Limit: 10 requests per 1 second per user**


        `GET /v1/position_history`

        '
      tags:
      - private
      parameters:
      - name: symbol
        in: query
        description: ''
        required: false
        schema:
          type: string
      - name: limit
        in: query
        description: ''
        required: true
        schema:
          type: number
      - $ref: '#/components/parameters/orderly_timestamp'
      - $ref: '#/components/parameters/orderly_account_id'
      - $ref: '#/components/parameters/orderly_key'
      - $ref: '#/components/parameters/orderly_signature'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PositionHistoryResponse'
  /v1/funding_fee/history:
    get:
      summary: Get funding fee history
      deprecated: false
      description: '**Limit: 20 requests per 60 second per user**


        `GET /v1/funding_fee/history`


        Get funding fee history.

        '
      tags:
      - private
      parameters:
      - name: symbol
        in: query
        description: omit to get funding fee history for all symbols
        required: false
        example: PERP_ETH_USDC
        schema:
          type: string
      - name: start_t
        in: query
        description: start time range that you wish to query, noted that the time stamp is a 13-digits timestamp.
        required: false
        example: ''
        schema:
          type: string
      - name: end_t
        in: query
        description: end time range that you wish to query, noted that the time stamp is a 13-digits timestamp.
        required: false
        example: ''
        schema:
          type: string
      - name: page
        in: query
        description: the page you wish to query. start from 1
        required: false
        example: ''
        schema:
          type: string
      - name: size
        in: query
        description: 'Default: 60'
        required: false
        example: ''
        schema:
          type: string
      - $ref: '#/components/parameters/orderly_timestamp'
      - $ref: '#/components/parameters/orderly_account_id'
      - $ref: '#/components/parameters/orderly_key'
      - $ref: '#/components/parameters/orderly_signature'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FundingFeeHistoryResponse'
  /v1/client/leverage:
    get:
      summary: Get leverage setting
      deprecated: false
      description: '**Limit: 1 requests per 1 second per IP address**


        `GET /v1/client/leverage`


        Get account''s leverage setting for a specific symbol.

        '
      tags:
      - private
      parameters:
      - name: symbol
        in: query
        description: ''
        required: true
        example: PERP_BTC_USDC
        schema:
          type: string
      - name: margin_mode
        in: query
        description: 'Default: `CROSS`. Supported values: `CROSS`/`ISOLATED`'
        required: false
        schema:
          type: string
          enum:
          - CROSS
          - ISOLATED
      - $ref: '#/components/parameters/orderly_timestamp'
      - $ref: '#/components/parameters/orderly_account_id'
      - $ref: '#/components/parameters/orderly_key'
      - $ref: '#/components/parameters/orderly_signature'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LeverageResponse'
  /v1/client/leverages:
    get:
      summary: Get all leverage settings
      deprecated: false
      description: '`GET /v1/client/leverages`


        Get leverage settings for all symbols.

        '
      tags:
      - private
      parameters:
      - $ref: '#/components/parameters/orderly_timestamp'
      - $ref: '#/components/parameters/orderly_account_id'
      - $ref: '#/components/parameters/orderly_key'
      - $ref: '#/components/parameters/orderly_signature'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LeveragesResponse'
    post:
      summary: Update leverage setting
      deprecated: false
      description: "**Limit: 5 requests per 60 second per user**\n\n`POST /v1/client/leverages`\n\nUpdate leverage settings. This endpoint supports two modes:\n\n**Single symbol mode:** When `symbol` is provided, update leverage for that specific symbol.\n\n**Batch mode:** When `symbol` is omitted, set leverage for all symbols in a single atomic operation. Each symbol's new leverage will be adjusted to `min(requested_leverage, symbol_max_leverage)`.\n\nFor example, if BTC max leverage is 100, ETH max leverage is 100, and NEAR max leverage is 10, and the user requests leverage = 20, the result will be: BTC = 20, ETH = 20, NEAR = 10.\n\nBatch update behavior with margin modes:\n- **Cross margin symbols:** A margin check is performed assuming all cross-margin symbols are updated to the new leverage. Either all cross-margin symbol leverages are updated successfully, or none are updated.\n- **Isolated margin symbols:** The leverage update will only apply to symbols with no active isolated positions or pending orders. The update for isolated margin symbols will always go through for eligible symbols.\n\nValidation Logic:\n\n1. Check the leverage range is eligible\n\n2. Check if the position notional under the updated leverage is acceptable\n   - `max_notional = (1 / (symbol_leverage * imr_factor)) ^ (1/0.8)`\n   - `symbol_leverage_max = round down to int → min(1 / (imr_factor * notional ^ 0.8), 1/base_imr)`\n\n3. Check if the margin is enough\n"
      tags:
      - private
      parameters:
      - $ref: '#/components/parameters/orderly_timestamp'
      - $ref: '#/components/parameters/orderly_account_id'
      - $ref: '#/components/parameters/orderly_key'
      - $ref: '#/components/parameters/orderly_signature'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                symbol:
                  type: string
                  example: PERP_BTC_USDC
                leverage:
                  type: integer
                  description: Integer between 1 to 100
                margin_mode:
                  type: string
                  description: 'Default: `CROSS`. Margin mode for the leverage update.'
                  enum:
                  - CROSS
                  - ISOLATED
              required:
              - leverage
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LeverageResponse'
  /v1/liquidations:
    get:
      summary: Get liquidated positions of account
      deprecated: false
      description: '**Limit: 10 requests per 1 second per IP address**


        `GET /v1/liquidations`

        '
      tags:
      - private
      parameters:
      - name: symbol
        in: query
        description: ''
        required: false
        example: ''
        schema:
          type: string
      - name: start_t
        in: query
        description: ''
        required: false
        example: ''
        schema:
          type: number
      - name: end_t
        in: query
        description: ''
        required: false
        example: ''
        schema:
          type: number
      - name: page
        in: query
        description: start from 1
        required: false
        example: ''
        schema:
          type: number
      - name: size
        in: query
        description: ''
        required: false
        example: ''
        schema:
          type: number
      - name: sort_by
        in: query
        description: '`liquidation_id`/`time`'
        required: false
        example: ''
        schema:
          type: string
      - name: liquidation_id
        in: query
        description: return the designed liquidation_id only
        required: false
        example: ''
        schema:
          type: number
      - $ref: '#/components/parameters/orderly_timestamp'
      - $ref: '#/components/parameters/orderly_account_id'
      - $ref: '#/components/parameters/orderly_key'
      - $ref: '#/components/parameters/orderly_signature'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LiquidationsResponse'
  /v1/liquidation:
    post:
      summary: Claim liquidated positions
      deprecated: false
      description: '**Limit: 5 requests per 1 second**


        `POST /v1/liquidation`

        '
      tags:
      - private
      parameters:
      - $ref: '#/components/parameters/orderly_timestamp'
      - $ref: '#/components/parameters/orderly_account_id'
      - $ref: '#/components/parameters/orderly_key'
      - $ref: '#/components/parameters/orderly_signature'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LiquidationBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostLiquidationResponse'
  /v1/client/liquidator_liquidations:
    get:
      summary: Get liquidated positions by liquidator
      deprecated: false
      description: '**Limit: 10 requests per 1 second per IP address**


        `GET /v1/client/liquidator_liquidations`

        '
      tags:
      - private
      parameters:
      - name: symbol
        in: query
        description: ''
        required: false
        example: ''
        schema:
          type: string
      - name: start_t
        in: query
        description: ''
        required: false
        example: ''
        schema:
          type: number
      - name: end_t
        in: query
        description: ''
        required: false
        example: ''
        schema:
          type: number
      - name: page
        in: query
        description: start from 1
        required: false
        example: ''
        schema:
          type: number
      - name: size
        in: query
        description: ''
        required: false
        example: ''
        schema:
          type: number
      - $ref: '#/components/parameters/orderly_timestamp'
      - $ref: '#/components/parameters/orderly_account_id'
      - $ref: '#/components/parameters/orderly_key'
      - $ref: '#/components/parameters/orderly_signature'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LiquidatorLiquidationsResponse'
  /v1/order:
    post:
      summary: Create order
      deprecated: false
      description: '**Limit: 10 requests per 1 second**


        `POST /v1/order`


        Place order maker/taker, the order executed information will be update from websocket stream.

        will response immediately with an order created message.


        `MARKET` type order behavior: it matches until the full size is executed. If the size is too large (larger than whole book) or the matching price exceeds the price limit (refer to `price_range`), then the remaining quantity will be cancelled.


        `IOC` type order behavior: it matches as much as possible at the order_price. If not fully executed, then remaining quantity will be cancelled.


        `FOK` type order behavior: if the order can be fully executed at the order_price then the order gets fully executed otherwise would be cancelled without any execution.


        `POST_ONLY` type order behavior: if the order will be executed with any maker trades at the time of placement, then it will be cancelled without any execution. If a `POST_ONLY` order would match only with hidden quantity at the price level, the incoming `POST_ONLY` order is treated as the maker side for that execution and the resting hidden order is treated as the taker side.


        `ASK` type order behavior: the order price is guranteed to be the best ask price of the orderbook at the time it gets accepted.


        `BID` type order behavior: the order price is guranteed to be the best bid price of the orderbook at the time it gets accepted.


        `visible_quantity` behavior: it sets the maximum quantity to be shown on orderbook. By default, it is equal to order_quantity, negative number and number larger than `order_quantity` is not allowed. If it sets to 0, the order would be hidden from the orderbook. It doesn''t work for `MARKET`/`IOC`/`FOK` orders since orders with these types would be executed and cancelled immediately and not be shown on orderbook. For `LIMIT` order, as long as it''s not complete, `visible_quantity` is the maximum quantity that shown on orderbook. When hidden quantity is matched by a new incoming order, the hidden side is marked as taker and charged the taker fee. If an order has both hidden and visible quantity, the hidden quantity is matched before the visible quantity.


        `order_quantity` are provided. The precision of the number should be within 8 digits.


        `client_order_id` behavior: customized order_id, a unique id among open orders. Orders with the same `client_order_id` can be accepted only when the previous one if completed, otherwise the order will be rejected.


        Note: This endpoint requires `trading` scope in orderly key.'
      tags:
      - private
      parameters:
      - $ref: '#/components/parameters/orderly_timestamp'
      - $ref: '#/components/parameters/orderly_account_id'
      - $ref: '#/components/parameters/orderly_key'
      - $ref: '#/components/parameters/orderly_signature'
      - $ref: '#/components/parameters/recv_window_header'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostOrderBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostOrderResponse'
    delete:
      summary: Cancel order
      deprecated: false
      description: '**Limit: 10 requests per 1 second**


        `DELETE /v1/order?order_id={order_id}&symbol={symbol}`


        Cancels a single order by `order_id`.


        Note: This endpoint requires `trading` scope in orderly key.

        '
      tags:
      - private
      parameters:
      - name: symbol
        in: query
        description: ''
        required: true
        example: ''
        schema:
          type: string
      - name: order_id
        in: query
        description: ''
        required: true
        example: ''
        schema:
          type: number
      - $ref: '#/components/parameters/orderly_timestamp'
      - $ref: '#/components/parameters/orderly_account_id'
      - $ref: '#/components/parameters/orderly_key'
      - $ref: '#/components/parameters/orderly_signature'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteOrderResponse'
    put:
      summary: Edit order
      deprecated: false
      description: '**Limit: 10 request per 1 second**


        `PUT /v1/order`


        Edit a pending order by `order_id`. Only the `order_price` or `order_quantity` can be amended.


        Note: This endpoint requires `trading` scope in orderly key.'
      tags:
      - private
      parameters:
      - $ref: '#/components/parameters/orderly_timestamp'
      - $ref: '#/components/parameters/orderly_account_id'
      - $ref: '#/components/parameters/orderly_key'
      - $ref: '#/components/parameters/orderly_signature'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PutOrderResponse'
  /v1/order/{order_id}:
    get:
      summary: Get order by order_id
      deprecated: false
      description: '**Limit: 10 requests per 1 second**


        `GET /v1/order/{order_id}`


        Get details of a single order by `order_id`.

        '
      tags:
      - private
      parameters:
      - name: order_id
        in: path
        description: id of the order
        required: true
        schema:
          type: string
      - $ref: '#/components/parameters/orderly_timestamp'
      - $ref: '#/components/parameters/orderly_account_id'
      - $ref: '#/components/parameters/orderly_key'
      - $ref: '#/components/parameters/orderly_signature'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderResponse'
  /v1/trades:
    get:
      summary: Get trades
      deprecated: false
      description: '**Limit: 10 requests per 1 second**


        `GET /v1/trades`


        Return client''s trades history within a time range.


        Only return the latest 500 entries.

        '
      tags:
      - private
      parameters:
      - name: symbol
        in: query
        description: ''
        required: false
        example: ''
        schema:
          type: string
      - name: start_t
        in: query
        description: start time range that wish to query, noted the time stamp is 13-digits timestamp.
        required: false
        example: ''
        schema:
          type: number
      - name: end_t
        in: query
        description: end time range that wish to query, noted the time stamp is 13-digits timestamp.
        required: false
        example: ''
        schema:
          type: number
      - name: page
        in: query
        description: the page you wish to query. start from 1
        required: false
        example: ''
        schema:
          type: number
      - name: size
        in: query
        description: 'the page size you wish to query. (max: 500)'
        required: false
        example: ''
        schema:
          type: number
      - $ref: '#/components/parameters/orderly_timestamp'
      - $ref: '#/components/parameters/orderly_account_id'
      - $ref: '#/components/parameters/orderly_key'
      - $ref: '#/components/parameters/orderly_signature'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TradesResponse'
  /v1/client/holding:
    get:
      summary: Get current holding
      deprecated: false
      description: '**Limit: 10 requests per 1 seconds**


        `GET /v1/client/holding`


        Get the current summary of user token holdings.

        '
      tags:
      - private
      parameters:
      - name: all
        in: query
        description: true/false. If true then will return all token even if balance is empty.
        required: false
        example: ''
        schema:
          type: boolean
      - $ref: '#/components/parameters/orderly_timestamp'
      - $ref: '#/components/parameters/orderly_account_id'
      - $ref: '#/components/parameters/orderly_key'
      - $ref: '#/components/parameters/orderly_signature'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientHoldingResponse'
  /v1/account_info:
    get:
      summary: Get account overview info
      deprecated: false
      description: '**Limit: 10 requests per 1 second per user**


        `GET /v1/account_info`


        Returns account-level collateral, margin, and PnL overview metrics for the authenticated account.

        '
      tags:
      - private
      parameters:
      - $ref: '#/components/parameters/orderly_timestamp'
      - $ref: '#/components/parameters/orderly_account_id'
      - $ref: '#/components/parameters/orderly_key'
      - $ref: '#/components/parameters/orderly_signature'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountInfoResponse'
  /v1/client/margin_mode:
    post:
      summary: Update margin mode
      deprecated: false
      description: '**Limit: 10 requests per 1 second per user**


        `POST /v1/client/margin_mode`


        Update the default margin mode for a specific symbol. Switching a symbol''s margin mode is only possible when you have no open positions or pending orders on that symbol in the current mode.

        '
      tags:
      - private
      parameters:
      - $ref: '#/components/parameters/orderly_timestamp'
      - $ref: '#/components/parameters/orderly_account_id'
      - $ref: '#/components/parameters/orderly_key'
      - $ref: '#/components/parameters/orderly_signature'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                symbol:
                  type: string
                  description: Symbol to update margin mode for
                  example: PERP_BTC_USDC
                default_margin_mode:
                  type: string
                  description: Target margin mode
                  enum:
                  - CROSS
                  - ISOLATED
                  example: ISOLATED
              required:
              - symbol
              - default_margin_mode
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicResponse'
  /v1/position_margin:
    post:
      summary: Add or reduce position margin
      deprecated: false
      description: '**Limit: 10 requests per 1 second per user**


        `POST /v1/position_margin`


        Add or reduce margin for an existing isolated margin position. This allows you to adjust the margin allocated to a specific isolated position after it has been opened.


        - `ADD`: Transfer margin from your available balance to the isolated position, lowering the liquidation price.

        - `REDUCE`: Transfer margin from the isolated position back to your available balance, raising the liquidation price.


        **Prerequisites:** You must have an open isolated position on the specified symbol.


        Note: This endpoint requires `trading` scope in orderly key.

        '
      tags:
      - private
      parameters:
      - $ref: '#/components/parameters/orderly_timestamp'
      - $ref: '#/components/parameters/orderly_account_id'
      - $ref: '#/components/parameters/orderly_key'
      - $ref: '#/components/parameters/orderly_signature'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                symbol:
                  type: string
                  description: Symbol of the isolated position
                  example: PERP_ETH_USDC
                amount:
                  type: string
                  description: Amount of margin to add or reduce
                  example: '3'
                type:
                  type: string
                  description: Operation type
                  enum:
                  - ADD
                  - REDUCE
                  example: ADD
              required:
              - symbol
              - amount
              - type
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BasicResponse'
  /v1/client/margin_modes:
    get:
      summary: Get margin modes
      deprecated: false
      description: '**Limit: 10 requests per 1 second per user**


        `GET /v1/client/margin_modes`


        Get default margin mode for all symbols.

        '
      tags:
      - private
      parameters:
      - $ref: '#/components/parameters/orderly_timestamp'
      - $ref: '#/components/parameters/orderly_account_id'
      - $ref: '#/components/parameters/orderly_key'
      - $ref: '#/components/parameters/orderly_signature'
     

# --- truncated at 32 KB (351 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/orderly-network/refs/heads/main/openapi/orderly-network-private-api-openapi.yml