Rarible User balances API

The User balances API from Rarible β€” 1 operation(s) for user balances.

OpenAPI Specification

rarible-user-balances-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: OpenAPI definition Charts User balances API
  version: v0.1
  description: '# Exciting News


    Hey there, amazing developers! πŸ‘‹


    We''ve got some fantastic news to share that will make your experience with our product even better. We''re thrilled to announce the implementation of API-Keys, which brings a new level of control and convenience to your development process. So, let''s dive right into the details! ✨


    ## API-Keys for Enhanced Functionality πŸ”‘


    Starting now, we have introduced API-Keys to streamline your interactions with our methods. You might have noticed a slight change while making requests – now, all you need to do is include the parameter `X-API-KEY` in the Header of your request. Simple as that!


    ## Get Your API-Key in a Snap! ⚑️


    Securing your API-Key is a breeze. We''ve made the process super user-friendly to ensure you can get started quickly. Just head over to our website and fill out a simple form. Once you''ve done that, your shiny new API-Key will be delivered straight to your email inbox. Easy peasy! πŸ“§


    [Get Your API-Key Here](https://api.rarible.org/registration)

    [Configure SDK with API-key](https://github.com/rarible/sdk#api-querying)


    ## Unlock the Power of the Rarible Protocol πŸ”“


    As passionate developers, we know you''re always hungry for knowledge and eager to explore new frontiers. That''s why we invite you to discover the incredible world of the Rarible Protocol. By visiting our dedicated protocol page, you''ll gain access to a treasure trove of useful information, tips, and insights that will elevate your development skills to new heights. πŸš€


    [Explore the Rarible Protocol](https://rarible.org)


    So, buckle up and get ready for an enhanced development journey with our API-Keys. We''re excited to see what you''ll create using our revamped system! πŸ’ͺπŸš€


    Stay curious, keep innovating, and happy coding! ✨


    [P.S. Join our Discord Server to stay up to date and ask questions](https://discord.gg/rarifoundation)

    '
servers:
- url: https://{environment}.rarible.org
  description: Production (Mainnet)
  variables:
    environment:
      enum:
      - api
      - testnet-api
      default: api
security:
- ApiKeyAuth: []
tags:
- name: User balances
  x-controller: BalanceController
paths:
  /v0.1/balances/{currencyId}/{owner}:
    get:
      tags:
      - User balances
      summary: Get balance
      description: Return user's balance of specified currency
      operationId: getBalance
      parameters:
      - name: currencyId
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/CurrencyId'
      - name: owner
        description: Address of the token's owner
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/UnionAddress'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Balance'
        '404':
          $ref: '#/components/responses/EntityNotFound'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  schemas:
    UnionApiErrorServerError:
      required:
      - code
      - message
      type: object
      properties:
        code:
          type: string
          enum:
          - UNKNOWN
          default: UNKNOWN
        message:
          type: string
          description: Error message
    CurrencyId:
      type: string
      description: Currency Id, has format `ETHEREUM:${token}` or `ETHEREUM:${token}:${tokenId}`
      example: ETHEREUM:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
    UnionAddress:
      type: string
      description: Blockchain address in Union format `${blockchainGroup}:${token}`
      example: ETHEREUM:0x4765273c477c2dc484da4f1984639e943adccfeb
    BigDecimal:
      type: string
      example: 123456.789
    UnionApiErrorBadRequest:
      required:
      - code
      - message
      type: object
      properties:
        code:
          type: string
          enum:
          - BAD_REQUEST
          - VALIDATION
          default: BAD_REQUEST
        message:
          type: string
          description: Error message
    BigInteger:
      type: string
      example: 123456
    UnionApiErrorEntityNotFound:
      required:
      - code
      - message
      type: object
      properties:
        code:
          type: string
          enum:
          - NOT_FOUND
          default: NOT_FOUND
        message:
          type: string
          description: Error message
    Balance:
      type: object
      required:
      - currencyId
      - owner
      - balance
      - decimal
      properties:
        currencyId:
          $ref: '#/components/schemas/CurrencyId'
        owner:
          $ref: '#/components/schemas/UnionAddress'
        balance:
          $ref: '#/components/schemas/BigInteger'
        decimal:
          $ref: '#/components/schemas/BigDecimal'
  responses:
    ServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnionApiErrorServerError'
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnionApiErrorBadRequest'
    EntityNotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/UnionApiErrorEntityNotFound'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      x-default: 11111111-1111-1111-1111-111111111111