Revolut Balance API

Get your Revolut X crypto exchange balances, including both crypto and fiat.

OpenAPI Specification

revolut-balance-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  version: '1.0'
  title: Business Accounting Balance API
  description: "As a Revolut Business customer with a Business Account, you can use the Business API to automate your own business processes.\nSave time, reduce your costs, and avoid errors by using the Business API. \n\n:::tip[Before you get started]\nTo learn more about the Business API and its features, check the [**user guides**](https://developer.revolut.com/docs/guides/manage-accounts/introduction).\n\nYou can reach them at any time from the main navigation bar **→ Guides → Business**.\n:::\n\nYou can view accounts, manage counterparties, make payments or currency exchanges without manual effort in the Web UI:\n\n- Accounting: [Account management](https://developer.revolut.com/docs/api/business#get-account), [Accounting settings](https://developer.revolut.com/docs/api/business#tag-accounting), [Expense management](https://developer.revolut.com/docs/api/business#get-expense), [Transactions](https://developer.revolut.com/docs/api/business#get-transactions) \n- Payments: \n  - [Counterparty management](https://developer.revolut.com/docs/api/business#get-counterparties)\n  - Payment management: [Payment drafts](https://developer.revolut.com/docs/api/business#delete-payment-draft), [Payout links](https://developer.revolut.com/docs/api/business#get-payout-link), [Transfers](https://developer.revolut.com/docs/api/business#tag-transfers)\n  - [Foreign exchange](https://developer.revolut.com/docs/api/business#tag-foreign-exchange)\n- Business team: [Card management](https://developer.revolut.com/docs/api/business#delete-card), [Card invitation management](https://developer.revolut.com/docs/api/business#update-card-invitation), [Team member management](https://developer.revolut.com/docs/api/business#delete-team-member)\n- Developer tools: [Sandbox simulations](https://developer.revolut.com/docs/api/business#tag-simulations), [Webhook management](https://developer.revolut.com/docs/api/business#tag-webhooks-v2)\n\nTo see the reference for the specific endpoints and operations of this API, browse the menu on the left.\n\n### Test the Business API\n\nYou can test the Business API in Postman by forking this collection:\n\n[![View in Postman](https://run.pstmn.io/button.svg)](https://www.postman.com/revolut-api/workspace/revolut-developers/overview)"
  contact: {}
servers:
- url: https://b2b.revolut.com/api/1.0
  description: Production server (uses live data)
- url: https://sandbox-b2b.revolut.com/api/1.0
  description: Sandbox server (uses test data)
tags:
- name: Balance
  description: Get your Revolut X crypto exchange balances, including both crypto and fiat.
paths:
  /balances:
    get:
      tags:
      - Balance
      summary: Get all balances
      operationId: getAllBalances
      description: 'Get crypto exchange account balances for the requesting user.

        The user is resolved by the provided API key.'
      parameters:
      - $ref: '#/components/parameters/XRevxTimestamp'
      - $ref: '#/components/parameters/XRevxSignature'
      responses:
        '200':
          description: 'OK


            The list of available balances.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountBalance'
              examples:
                AccountBalanceExample:
                  summary: Balances response
                  $ref: '#/components/examples/AccountBalanceExample'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
        5XX:
          $ref: '#/components/responses/ServerError'
components:
  responses:
    ServerError:
      description: Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            message: Something went wrong!
            error_id: 7d85b5e7-d0f0-4696-b7b5-a300d0d03a5e
            timestamp: 3318215482991
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            message: API key can only be used for authentication from whitelisted IP
            error_id: 7d85b5e7-d0f0-4696-b7b5-a300d0d03a5e
            timestamp: 3318215482991
    Conflict:
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            message: Request timestamp is in the future
            error_id: 7d85b5e7-d0f0-4696-b7b5-a300d0d03a5e
            timestamp: 3318215482991
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            message: Forbidden
            error_id: 7d85b5e7-d0f0-4696-b7b5-a300d0d03a5e
            timestamp: 3318215482991
    RateLimitExceeded:
      description: Rate Limit Exceeded
      headers:
        Retry-After:
          description: The number of milliseconds to wait before making a new request.
          schema:
            type: integer
            example: 5000
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            message: Rate Limit Exceeded
            error_id: 7d85b5e7-d0f0-4696-b7b5-a300d0d03a5e
            timestamp: 3318215482991
  schemas:
    AccountBalance:
      type: array
      items:
        $ref: '#/components/schemas/AccountBalanceEntry'
    ErrorResponse:
      type: object
      description: Standard error response structure
      required:
      - error_id
      - message
      - timestamp
      properties:
        error_id:
          type: string
          format: uuid
          description: Unique identifier for this specific error occurrence.
        message:
          type: string
          description: Human-readable description of the error.
        timestamp:
          type: integer
          format: int64
          description: The time the error occurred in Unix epoch milliseconds.
    AccountBalanceEntry:
      type: object
      properties:
        currency:
          type: string
          description: Currency.
          example: BTC
        available:
          type: string
          format: decimal
          description: Available (free) funds amount. Returned as a string to prevent rounding errors.
          example: '1000.0000'
        staked:
          type: string
          format: decimal
          description: "Staked funds currently earning rewards. \nReturned as a string to prevent floating-point rounding errors."
          example: '2000.5000'
        reserved:
          type: string
          format: decimal
          description: Reserved (locked) funds amount. Returned as a string to prevent rounding errors.
          example: '234.5000'
        total:
          type: string
          format: decimal
          description: Sum of available, reserved, and staked funds. Returned as a string to avoid floating-point rounding errors.
          example: '1234.5000'
      required:
      - currency
      - available
      - reserved
      - total
      example:
        currency: BTC
        available: '1000.00000000'
        reserved: '234.50000000'
        total: '1234.50000000'
  parameters:
    XRevxTimestamp:
      in: header
      name: X-Revx-Timestamp
      required: true
      description: "Current timestamp in Unix epoch milliseconds. \nUsed to prevent replay attacks and construct the signature.\nProvided with other authentication headers."
      schema:
        type: integer
        example: 1746007718237
    XRevxSignature:
      in: header
      name: X-Revx-Signature
      required: true
      description: "The Ed25519 signature of the request. \nProvided with other authentication headers.\n\n:::tip\nSee **Authentication headers: Signing a request** for details on how to generate this.\n:::"
      schema:
        type: string
        example: 2h/t5o8w+l5s+fjyfA0n/e7j4u5b7h4e+g4k4c8h7a2p6k0g7j1f+w0i2j3k9r0l3s8m5t6r+q1s+o3v/t4x8v5y+w1r+m2t/k3w/j4y+
  examples:
    AccountBalanceExample:
      value:
      - currency: BTC
        available: '1.25000000'
        reserved: '0.10000000'
        total: '1.35000000'
      - currency: ETH
        available: '10.00000000'
        reserved: '0.00000000'
        staked: '32.00000000'
        total: '42.00000000'
      - currency: USD
        available: '5400.50'
        reserved: '100.00'
        total: '5500.50'
  securitySchemes:
    AccessToken:
      type: http
      scheme: bearer
      description: "Each Business API request must contain an authorization header in the following format to make a call: `Bearer <your_access_token>`.\n\nThe access token will be obtained the first time you set up your application and has an expiration of 40 minutes. \nDuring setup, a `refresh_token` will also be obtained which allows to obtain a new `access_token`.\n\n:::danger\nNever share your client-assertion JWT (JSON web token), `access_token` and `refresh_token` with anyone, as these can be used to access your banking data and initiate transactions.\n:::\n\nAccess tokens can be issued with four security scopes and require a JWT (JSON Web Token) signature to be obtained:\n- `READ`: Permissions for `GET` operations.\n- `WRITE`: Permissions to update counterparties, webhooks, and issue payment drafts.\n- `PAY`: Permissions to initiate or cancel transactions and currency exchanges.    \n- `READ_SENSITIVE_CARD_DATA`: Permissions to retrieve sensitive card details.\n\n  :::warning\n  If you enable the `READ_SENSITIVE_CARD_DATA` scope for your access token, you must set up IP whitelisting. \n  Failing to do so will prevent you from accessing **any** Business API endpoint. \n\n  IP whitelisting means that you must specify an IP or a set of IPs which will be the only IPs from which requests to the API will be accepted. \n  To do so:\n  1. Go to the Revolut Business web app [settings](https://business.revolut.com/settings) → **APIs** → **Business API**.\n  2. Select the corresponding API certificate.\n  3. In **Production IP whitelist**, provide the IP(s) which should be whitelisted.\n      Make sure that the IPs you provide are **not** [local (i.e. private) IP addresses](https://www.okta.com/en-sg/identity-101/understanding-private-ip-ranges/). \n  4. Save the new settings.\n  :::\n\nTo configure your JWT and obtain the refresh and first access tokens, complete the following steps:\n\n  1. [Sign up for a Revolut Business account](https://developer.revolut.com/docs/guides/manage-accounts/get-started/sign-up-for-revolut-business-account)\n  2. [Prepare your Sandbox environment](https://developer.revolut.com/docs/guides/manage-accounts/get-started/prepare-sandbox-environment)\n  3. [Make your first API request](https://developer.revolut.com/docs/guides/manage-accounts/get-started/make-your-first-api-request)"