BloFin Account API

The Account API from BloFin — 12 operation(s) for account.

Operations 12

GET /api/v1/account/balance Retrieve a list of assets (with non-zero balance), remaining balance, and… #
GET /api/v1/account/batch-leverage-info GET Multiple Leverage #
GET /api/v1/account/config Get Account Config #
GET /api/v1/account/funding-fees Retrieve funding fee history #
GET /api/v1/account/leverage-info Deprecated, if you are using it, please use GET Multiple Leverage instead #
GET /api/v1/account/margin-mode Get user's margin mode setting #
GET /api/v1/account/position-mode Get user's position mode (Hedge Mode or One-way Mode) on every symbol #
GET /api/v1/account/positions Retrieve information on your positions #
GET /api/v1/account/positions-history Retrieve information on your historical positions #
POST /api/v1/account/set-leverage Set Leverage #
POST /api/v1/account/set-margin-mode Set user's margin mode #
POST /api/v1/account/set-position-mode Change user's position mode (Hedge Mode or One-way Mode) on every symbol #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/blofin:blofin-account-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

blofin-account-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: BloFin Account API
  version: '2026-10-13'
  description: 'GENERATED FROM DOCUMENTATION by API Evangelist on 2026-10-13: 110 operation(s) read from 3 public documentation page(s) (each operation names its page in x-source). This is not the provider''s published contract; BloFin has published no machine-readable contract that the pipeline could find. Engine: anthropic.'
  x-evidence-tiers:
    code-example: 0
    documentation: 110
    pages-with-code: 0
    pages-read: 3
  x-generated-from: documentation
  x-provenance: generated
  x-authored-by: API Evangelist
  x-generated: '2026-10-13'
  x-generator: generate-contract-from-docs.py
  x-engine: anthropic
  x-sources:
  - https://docs.blofin.com/spot.html
  - https://docs.blofin.com/index.html
  - https://docs.blofin.com/broker.html
servers:
- url: https://openapi.blofin.com
security:
- accessKey: []
  accessSign: []
  accessTimestamp: []
  accessNonce: []
  accessPassphrase: []
tags:
- name: Account
paths:
  /api/v1/account/balance:
    get:
      operationId: get_api_v1_account_balance
      tags:
      - Account
      summary: Retrieve a list of assets (with non-zero balance), remaining balance, and…
      x-source: https://docs.blofin.com/index.html
      parameters:
      - name: productType
        in: query
        required: false
        schema:
          type: string
        description: Product Type USDT-FUTURES COIN-FUTURES unified account use USDT-FUTURES The default is USDT-FUTURES
      responses:
        '200':
          description: Success (status as documented)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetApiV1AccountBalanceResponse'
      x-evidence:
        kind: documentation
  /api/v1/account/batch-leverage-info:
    get:
      operationId: get_api_v1_account_batch_leverage_info
      tags:
      - Account
      summary: GET Multiple Leverage
      x-source: https://docs.blofin.com/index.html
      parameters:
      - name: instId
        in: query
        required: true
        schema:
          type: string
        description: Instrument ID Single instrument ID or multiple instrument IDs (no more than 20) separated with comma
      - name: marginMode
        in: query
        required: true
        schema:
          type: string
        description: Margin mode cross isolated
      responses:
        '200':
          description: Success (status as documented)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetApiV1AccountBatchLeverageInfoResponse'
      x-evidence:
        kind: documentation
  /api/v1/account/config:
    get:
      operationId: get_api_v1_account_config
      tags:
      - Account
      summary: Get Account Config
      x-source: https://docs.blofin.com/index.html
      responses:
        '200':
          description: Success (status as documented)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetApiV1AccountConfigResponse'
      x-evidence:
        kind: documentation
  /api/v1/account/funding-fees:
    get:
      operationId: get_api_v1_account_funding_fees
      tags:
      - Account
      summary: Retrieve funding fee history
      x-source: https://docs.blofin.com/index.html
      parameters:
      - name: begin
        in: query
        required: true
        schema:
          type: string
        description: Filter with a begin timestamp. Unix timestamp format in milliseconds, e.g. 1597026383085 . The interval between begin and end must be within 7 days
      - name: end
        in: query
        required: true
        schema:
          type: string
        description: Filter with an end timestamp. Unix timestamp format in milliseconds, e.g. 1597026383085 . The interval between begin and end must be within 7 days
      - name: instId
        in: query
        required: false
        schema:
          type: string
        description: Instrument ID, e.g. BTC-USDT . Returns all instruments if not specified
      - name: limit
        in: query
        required: false
        schema:
          type: string
        description: Number of results per request. The maximum is 1000 ; The default is 100
      - name: after
        in: query
        required: false
        schema:
          type: string
        description: Pagination of data to return records earlier than the requested billId
      - name: before
        in: query
        required: false
        schema:
          type: string
        description: Pagination of data to return records newer than the requested billId
      responses:
        '200':
          description: Success (status as documented)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetApiV1AccountFundingFeesResponse'
      x-evidence:
        kind: documentation
  /api/v1/account/leverage-info:
    get:
      operationId: get_api_v1_account_leverage_info
      tags:
      - Account
      summary: Deprecated, if you are using it, please use GET Multiple Leverage instead
      x-source: https://docs.blofin.com/index.html
      parameters:
      - name: instId
        in: query
        required: true
        schema:
          type: string
        description: Instrument ID, e.g. BTC-USDT
      - name: marginMode
        in: query
        required: true
        schema:
          type: string
        description: Margin mode cross isolated
      responses:
        '200':
          description: Success (status as documented)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetApiV1AccountLeverageInfoResponse'
      x-evidence:
        kind: documentation
  /api/v1/account/margin-mode:
    get:
      operationId: get_api_v1_account_margin_mode
      tags:
      - Account
      summary: Get user's margin mode setting
      x-source: https://docs.blofin.com/index.html
      responses:
        '200':
          description: Success (status as documented)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetApiV1AccountMarginModeResponse'
      x-evidence:
        kind: documentation
  /api/v1/account/position-mode:
    get:
      operationId: get_api_v1_account_position_mode
      tags:
      - Account
      summary: Get user's position mode (Hedge Mode or One-way Mode) on every symbol
      x-source: https://docs.blofin.com/index.html
      responses:
        '200':
          description: Success (status as documented)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetApiV1AccountPositionModeResponse'
      x-evidence:
        kind: documentation
  /api/v1/account/positions:
    get:
      operationId: get_api_v1_account_positions
      tags:
      - Account
      summary: Retrieve information on your positions
      x-source: https://docs.blofin.com/index.html
      parameters:
      - name: instId
        in: query
        required: false
        schema:
          type: string
        description: Instrument ID, e.g. BTC-USDT
      - name: positionId
        in: query
        required: false
        schema:
          type: string
        description: Position ID
      responses:
        '200':
          description: Success (status as documented)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetApiV1AccountPositionsResponse'
      x-evidence:
        kind: documentation
  /api/v1/account/positions-history:
    get:
      operationId: get_api_v1_account_positions_history
      tags:
      - Account
      summary: Retrieve information on your historical positions
      x-source: https://docs.blofin.com/index.html
      parameters:
      - name: positionId
        in: query
        required: false
        schema:
          type: string
        description: Position ID
      - name: instId
        in: query
        required: false
        schema:
          type: string
        description: Instrument ID, e.g. BTC-USDT
      - name: state
        in: query
        required: false
        schema:
          type: string
        description: close position type partially_closed closed liquidated partially_liquidated adl
      - name: after
        in: query
        required: false
        schema:
          type: string
        description: Pagination of data to return records earlier than the requested historyId
      - name: before
        in: query
        required: false
        schema:
          type: string
        description: Pagination of data to return records newer than the requested historyId
      - name: begin
        in: query
        required: false
        schema:
          type: string
        description: Filter with a begin timestamp. Unix timestamp format in milliseconds, e.g. 1597026383085
      - name: end
        in: query
        required: false
        schema:
          type: string
        description: Filter with an end timestamp. Unix timestamp format in milliseconds, e.g. 1597026383085
      - name: limit
        in: query
        required: false
        schema:
          type: string
        description: Number of results per request. The maximum is 100 ; The default is 20
      responses:
        '200':
          description: Success (status as documented)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetApiV1AccountPositionsHistoryResponse'
      x-evidence:
        kind: documentation
  /api/v1/account/set-leverage:
    post:
      operationId: post_api_v1_account_set_leverage
      tags:
      - Account
      summary: Set Leverage
      x-source: https://docs.blofin.com/index.html
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostApiV1AccountSetLeverageRequest'
      responses:
        '201':
          description: Success (status as documented)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostApiV1AccountSetLeverageResponse'
      x-evidence:
        kind: documentation
  /api/v1/account/set-margin-mode:
    post:
      operationId: post_api_v1_account_set_margin_mode
      tags:
      - Account
      summary: Set user's margin mode
      x-source: https://docs.blofin.com/index.html
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostApiV1AccountSetMarginModeRequest'
      responses:
        '201':
          description: Success (status as documented)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostApiV1AccountSetMarginModeResponse'
      x-evidence:
        kind: documentation
  /api/v1/account/set-position-mode:
    post:
      operationId: post_api_v1_account_set_position_mode
      tags:
      - Account
      summary: Change user's position mode (Hedge Mode or One-way Mode) on every symbol
      x-source: https://docs.blofin.com/index.html
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostApiV1AccountSetPositionModeRequest'
      responses:
        '201':
          description: Success (status as documented)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostApiV1AccountSetPositionModeResponse'
      x-evidence:
        kind: documentation
components:
  schemas:
    PostApiV1AccountSetPositionModeRequest:
      type: object
      properties:
        positionMode:
          type: string
          description: 'Position mode net_mode : net long_short_mode : long/short'
        multiPosition:
          type: string
          description: Multi-Position switch, true false . Can be true only when positionMode is long_short_mode , otherwise an error is returned.
      required:
      - positionMode
    GetApiV1AccountPositionsResponse:
      type: object
      properties:
        positionId:
          type: string
          description: Position ID
        instId:
          type: string
          description: Instrument ID, e.g. BTC-USDT
        instType:
          type: string
          description: Instrument type
        marginMode:
          type: string
          description: Margin mode cross isolated
        positionSide:
          type: string
          description: 'Position side long : positions is positive short : positions is positive net (Positive positions means long position and negative positions means short position.)'
        leverage:
          type: string
          description: Leverage
        positions:
          type: string
          description: Quantity of positions
        availablePositions:
          type: string
          description: Position that can be closed
        averagePrice:
          type: string
          description: Average open price
        markPrice:
          type: string
          description: Latest Mark price
        marginRatio:
          type: string
          description: Margin ratio
        liquidationPrice:
          type: string
          description: Estimated liquidation price
        unrealizedPnl:
          type: string
          description: Unrealized profit and loss calculated by mark price.
        unrealizedPnlRatio:
          type: string
          description: Unrealized profit and loss ratio calculated by mark price.
        initialMargin:
          type: string
          description: Initial margin requirement, only applicable to cross .
        maintenanceMargin:
          type: string
          description: Maintenance margin requirement
        realizedPnl:
          type: string
          description: realized profit and loss
        createTime:
          type: string
          description: Creation time, Unix timestamp format in milliseconds, e.g. 1597026383085
        updateTime:
          type: string
          description: Latest time position was adjusted, Unix timestamp format in milliseconds, e.g. 1597026383085
        adl:
          type: string
          description: ADL level
    GetApiV1AccountBalanceResponse:
      type: object
      properties:
        ts:
          type: string
          description: Update time, Unix timestamp format in milliseconds, e.g. 1597026383085
        totalEquity:
          type: string
          description: The total amount of equity in USD
        isolatedEquity:
          type: string
          description: Isolated margin equity of the currency
        details:
          type: array
          description: Detailed asset information in all currencies
        currency:
          type: string
          description: Currency
        equity:
          type: string
          description: Equity of the currency
        balance:
          type: string
          description: Cash balance
        available:
          type: string
          description: Available balance of the currency
        availableEquity:
          type: string
          description: Available equity of the currency
        frozen:
          type: string
          description: Frozen balance of the currency
        orderFrozen:
          type: string
          description: Margin frozen for open orders
        equityUsd:
          type: string
          description: Equity in USD
        isolatedUnrealizedPnl:
          type: string
          description: Isolated unrealized profit and loss of the currency
        bonus:
          type: string
          description: Bonus balance
    PostApiV1AccountSetLeverageResponse:
      type: object
      properties:
        instId:
          type: string
          description: Instrument ID
        leverage:
          type: string
          description: Leverage
        marginMode:
          type: string
          description: Margin mode
        positionSide:
          type: string
          description: Position side long short net
    GetApiV1AccountBatchLeverageInfoResponse:
      type: object
      properties:
        instId:
          type: string
          description: Instrument ID
        leverage:
          type: string
          description: Leverage
        marginMode:
          type: string
          description: Margin mode
        positionSide:
          type: string
          description: Position side long short net
    PostApiV1AccountSetMarginModeRequest:
      type: object
      properties:
        marginMode:
          type: string
          description: Margin mode cross isolated
      required:
      - marginMode
    PostApiV1AccountSetPositionModeResponse:
      type: object
      properties:
        positionMode:
          type: string
          description: 'Position mode net_mode : net long_short_mode : long/short'
        multiPosition:
          type: string
          description: Multi-Position switch, true false . Always false under net_mode .
    GetApiV1AccountFundingFeesResponse:
      type: object
      properties:
        billId:
          type: string
          description: The unique funding fee bill ID
        instId:
          type: string
          description: Instrument ID, e.g. BTC-USDT
        currency:
          type: string
          description: The currency at the time of funding fee settlement
        fundingFee:
          type: string
          description: The actual funding fee amount. A positive value means received; a negative value means paid
        fundingTime:
          type: string
          description: The funding fee settlement time, in milliseconds
        positionSize:
          type: string
          description: The position size at the time of funding fee settlement
        marginMode:
          type: string
          description: 'Margin mode. Supported values include: cross , isolated'
        ts:
          type: string
          description: The timestamp when the funding fee bill data was generated, in milliseconds
    PostApiV1AccountSetMarginModeResponse:
      type: object
      properties:
        marginMode:
          type: string
          description: Margin mode
    GetApiV1AccountPositionsHistoryResponse:
      type: object
      properties:
        historyId:
          type: string
          description: History ID
        positionId:
          type: string
          description: Position ID
        instId:
          type: string
          description: Instrument ID, e.g. BTC-USDT
        instType:
          type: string
          description: Instrument type
        side:
          type: string
          description: Position side, buy or sell
        marginMode:
          type: string
          description: Margin mode cross isolated
        positionSide:
          type: string
          description: Position side long short net
        closePositions:
          type: string
          description: Closed position quantity
        maxPositions:
          type: string
          description: Maximum position quantity
        liquidationPositions:
          type: string
          description: Liquidation position quantity
        openAveragePrice:
          type: string
          description: Average open price
        closeAveragePrice:
          type: string
          description: Average close price
        createTime:
          type: string
          description: Creation time, Unix timestamp format in milliseconds, e.g. 1597026383085
        updateTime:
          type: string
          description: Update time, Unix timestamp format in milliseconds, e.g. 1597026383085
        leverage:
          type: string
          description: Leverage
        realizedPnl:
          type: string
          description: Realized profit and loss
        realizedPnlRatio:
          type: string
          description: Realized profit and loss ratio
        fee:
          type: string
          description: Trading fee
    PostApiV1AccountSetLeverageRequest:
      type: object
      properties:
        instId:
          type: string
          description: Instrument ID, e.g. BTC-USDT
        leverage:
          type: string
          description: Leverage
        marginMode:
          type: string
          description: Margin mode cross isolated
        positionSide:
          type: string
          description: Position side long short Only required when margin mode is isolated in long/short mode
        positionId:
          type: string
          description: Position ID. Only applicable to Multi-Position mode. When passed, adjusts the leverage of the specified position and only that position's margin and liquidation price are recalculated. When omitted, sets the instrument-level leverage, which applies to newly opened positions only.
      required:
      - instId
      - leverage
      - marginMode
    GetApiV1AccountConfigResponse:
      type: object
      properties:
        accountLevel:
          type: string
          description: 'Account Level 0 : normal 1 : spot 2 : spot futures 3 : multi currency 0 is normal account 1 / 2 / 3 is unified account'
    GetApiV1AccountLeverageInfoResponse:
      type: object
      properties:
        instId:
          type: string
          description: Instrument ID
        leverage:
          type: string
          description: Leverage
        marginMode:
          type: string
          description: Margin mode
    GetApiV1AccountPositionModeResponse:
      type: object
      properties:
        positionMode:
          type: string
          description: 'Position mode net_mode : net long_short_mode : long/short'
        multiPosition:
          type: string
          description: Multi-Position switch, true false . Always false under net_mode .
    GetApiV1AccountMarginModeResponse:
      type: object
      properties:
        marginMode:
          type: string
          description: Margin mode
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
    accessKey:
      type: apiKey
      in: header
      name: ACCESS-KEY
      description: Documented at https://docs.blofin.com/index.html#rest-authentication
    accessSign:
      type: apiKey
      in: header
      name: ACCESS-SIGN
      description: Documented at https://docs.blofin.com/index.html#rest-authentication
    accessTimestamp:
      type: apiKey
      in: header
      name: ACCESS-TIMESTAMP
      description: Documented at https://docs.blofin.com/index.html#rest-authentication
    accessNonce:
      type: apiKey
      in: header
      name: ACCESS-NONCE
      description: Documented at https://docs.blofin.com/index.html#rest-authentication
    accessPassphrase:
      type: apiKey
      in: header
      name: ACCESS-PASSPHRASE
      description: Documented at https://docs.blofin.com/index.html#rest-authentication
x-ae-postprocess: '2026-10-13: /oauth/* paths given the oauth.blofin.com server and bearer security named on https://docs.blofin.com/broker.html; REST auth headers from https://docs.blofin.com/index.html#rest-authentication; /api/v1/market/* and /api/v1/spot/market/* marked public (docs: Public Data endpoints do not require authentication).'