> ## Documentation Index
> Fetch the complete documentation index at: https://docs.whitebit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get my codes

> Get a list of WhiteBIT codes created by an account, including status and details, via the V4 API.



## OpenAPI

````yaml /openapi/private/main_api_v4.yaml POST /api/v4/main-account/codes/my
openapi: 3.0.3
info:
  title: WhiteBIT Private HTTP API V4
  description: |
    WhiteBIT Private HTTP API V4 for Main balance changes.

    Base URL: https://whitebit.com

    All endpoints return time in Unix-time format.
    All endpoints return either a JSON object or array.
    For receiving responses from API calls please use http method POST.
  version: 4.0.0
  contact:
    name: WhiteBIT Support
    email: support@whitebit.com
    url: https://whitebit.com
servers:
  - url: https://whitebit.com
    description: WhiteBIT Global Server
  - url: https://whitebit.eu
    description: WhiteBIT EU Server
security:
  - ApiKeyAuth: []
    PayloadAuth: []
    SignatureAuth: []
tags:
  - name: Main Account
    description: Main account balance and operations
  - name: Deposit
    description: Cryptocurrency and fiat deposit operations
  - name: Withdraw
    description: Cryptocurrency and fiat withdrawal operations
  - name: Transfer
    description: Balance transfer operations
  - name: Codes
    description: WhiteBIT codes operations
  - name: Crypto Lending - Fixed
    description: Fixed crypto lending plans
  - name: Crypto Lending - Flex
    description: Flexible crypto lending plans
  - name: Fees
    description: Fee information
  - name: Sub-Account
    description: Sub-account management
  - name: Sub-Account API Keys
    description: Sub-account API key management
  - name: Mining Pool
    description: Mining pool operations
  - name: Credit Line
    description: Credit line information
  - name: JWT
    description: JWT token management
paths:
  /api/v4/main-account/codes/my:
    post:
      tags:
        - Codes
      summary: Get my codes
      description: >
        The endpoint retrieves the list of [WhiteBIT
        codes](/glossary#whitebit-codes) created by my account.


        <Warning>

        Rate limit: 1000 requests/10 sec.

        </Warning>


        <Note>

        The API does not cache the response.

        </Note>


        <Note>

        Results are sorted by creation date, newest first. Pagination is capped
        at `offset + limit ≤ 10000`; for a complete history export beyond the
        cap, use the Report on the History page.

        </Note>
      operationId: getMyCodes
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - request
                - nonce
              properties:
                limit:
                  type: integer
                  minimum: 1
                  maximum: 100
                  default: 30
                  description: >-
                    LIMIT is a special clause used to limit records a particular
                    query can return.
                  example: 30
                offset:
                  type: integer
                  minimum: 0
                  maximum: 10000
                  default: 0
                  description: >-
                    Use the OFFSET clause to return entries starting from a
                    particular line.
                  example: 0
                request:
                  type: string
                  description: Request signature
                  example: '{{request}}'
                nonce:
                  type: integer
                  description: Unique request identifier
                  example: 1594297865000
            example:
              request: '{{request}}'
              nonce: 1594297865000
      responses:
        '201':
          description: All validations succeeded and creating transaction is started
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    type: integer
                    description: Total number of codes
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/CodeInfo'
                  limit:
                    type: integer
                  offset:
                    type: integer
              example:
                total: 15
                data:
                  - amount: '0.002'
                    code: WBe11f4fce-2a53-4edc-b195-66b693bd77e3ETH
                    date: 1598296332
                    status: Activated
                    ticker: ETH
                    external_id: cf7c3ff8-5eb0-11ed-9b6a-0242ac120002
                limit: 30
                offset: 0
        '400':
          description: Request validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                exceedsMaximum:
                  summary: Exceeds maximum values
                  value:
                    code: 0
                    message: Validation failed
                    errors:
                      limit:
                        - The limit may not be greater than 100.
                      offset:
                        - The offset may not be greater than 10000.
                belowMinimum:
                  summary: Below minimum values
                  value:
                    code: 0
                    message: Validation failed
                    errors:
                      limit:
                        - The limit must be at least 1.
                      offset:
                        - The offset must be at least 0.
                invalidType:
                  summary: Invalid field types
                  value:
                    code: 0
                    message: Validation failed
                    errors:
                      limit:
                        - The limit must be an integer.
                      offset:
                        - The offset must be an integer.
        '422':
          description: Inner validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInner'
components:
  schemas:
    CodeInfo:
      type: object
      properties:
        amount:
          type: string
          description: Code amount
          example: '100'
        code:
          type: string
          description: WhiteBIT code
          example: WBe50fbe4d5d...ee33
        date:
          type: integer
          description: Code creation timestamp
          example: 1598296132
        status:
          type: string
          description: Code status
          example: active
        ticker:
          type: string
          description: Code [ticker](/glossary#ticker)
          example: USDT
        external_id:
          type: string
          description: Code external identifier
          example: id1
    Error:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
    ErrorInner:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-TXC-APIKEY
      description: The public WhiteBIT API key.
    PayloadAuth:
      type: apiKey
      in: header
      name: X-TXC-PAYLOAD
      description: Base64-encoded JSON request body.
    SignatureAuth:
      type: apiKey
      in: header
      name: X-TXC-SIGNATURE
      description: >-
        HMAC-SHA512 signature of the payload, hex-encoded. Computed as
        hex(HMAC-SHA512(payload, api_secret)).

````