# Currencies

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/currencies:
    get:
      summary: Currencies
      deprecated: false
      description: >-
        Get a list of all available currencies. Use `type` to return only fiat
        or only crypto currencies.


        Each crypto currency lists the `networks` it can be deposited on, the
        default first. Use a network's `network` id with `GET` and `POST
        /v1/account/deposit-addresses`.


        - `contract_address` and `token_standard` identify the token on that
        network (e.g. USDC is the ERC-20 at `0xA0b8…eB48` on `ETHEREUM`). Both
        are `null` for the network's own coin, such as BTC on `BITCOIN` or BNB
        on `BNB_SMART_CHAIN`. Only the listed token is credited: a different
        token with the same name sent to your address can't be.

        - `destination_tag_type` is set on networks where every deposit needs a
        tag as well as the address (`destinationTag` on `XRP_LEDGER`; `memo` on
        `STELLAR`, `COSMOS_HUB` and `EOS`; `message` on `NEM`).


        `networks` is empty for fiat currencies and for crypto currencies that
        can't be deposited.
      operationId: currencies
      tags:
        - One Trading Public REST API/Public
        - public
      parameters:
        - name: type
          in: query
          description: >-
            Filters the currencies: `fiat` returns EUR, GBP, USD, CHF and TRY;
            `crypto` returns every other currency (including stablecoins such as
            USDC). Lowercase only.
          required: false
          schema:
            type: string
            enum:
              - crypto
              - fiat
            x-apidog-enum:
              - value: crypto
                name: ''
                description: ''
              - value: fiat
                name: ''
                description: ''
      responses:
        '200':
          x-apidog-name: OK
          description: >-
            The request was successful, and the server has returned the
            requested resource in the response body.
          content:
            application/json:
              schema:
                type: array
                items:
                  allOf:
                    - $ref: '#/components/schemas/Currency'
                    - type: object
                      required:
                        - networks
                      properties:
                        networks:
                          type: array
                          description: >-
                            The networks the currency can be deposited on, the
                            default first. Empty for fiat and for currencies
                            that can't be deposited.
                          items:
                            type: object
                            required:
                              - network
                              - name
                              - is_default
                              - token_standard
                              - contract_address
                              - destination_tag_type
                            properties:
                              network:
                                type: string
                                description: >-
                                  Network id, e.g. `ETHEREUM`, `BITCOIN`,
                                  `SOLANA`. Stable; use it in the deposit
                                  address endpoints.
                              name:
                                type: string
                                description: Display name, e.g. `Ethereum`.
                              is_default:
                                type: boolean
                                description: >-
                                  The network used when a request names none.
                                  Exactly one per currency.
                              token_standard:
                                type: string
                                description: >-
                                  The standard the token follows on this
                                  network, e.g. `ERC20`, `BEP20`, `SPL`. `null`
                                  for the network's own coin.
                                nullable: true
                              contract_address:
                                type: string
                                description: >-
                                  The token's contract address (an SPL token's
                                  mint) on this network. `null` for the
                                  network's own coin.
                                nullable: true
                              destination_tag_type:
                                type: string
                                enum:
                                  - memo
                                  - message
                                  - destinationTag
                                  - null
                                description: >-
                                  Set when deposits on this network need a tag
                                  as well as the address; the tag itself comes
                                  with the deposit address.
                                nullable: true
                            x-apidog-orders:
                              - network
                              - name
                              - is_default
                              - token_standard
                              - contract_address
                              - destination_tag_type
                            x-apidog-ignore-properties: []
                      x-apidog-orders:
                        - networks
                      x-apidog-ignore-properties: []
              examples:
                '1':
                  summary: BTC
                  value:
                    code: BTC
                    precision: 8
                    unified_cryptoasset_id: 1
                    name: Bitcoin
                    collateral_percentage: 0
                    networks:
                      - network: BITCOIN
                        name: Bitcoin
                        is_default: true
                        token_standard: null
                        contract_address: null
                        destination_tag_type: null
                '2':
                  summary: ETH
                  value:
                    code: ETH
                    precision: 8
                    unified_cryptoasset_id: 1027
                    name: Ethereum
                    collateral_percentage: 0
                    networks:
                      - network: ETHEREUM
                        name: Ethereum
                        is_default: true
                        token_standard: null
                        contract_address: null
                        destination_tag_type: null
                '3':
                  summary: EUR (fiat, no networks)
                  value:
                    code: EUR
                    precision: 2
                    unified_cryptoasset_id: 0
                    name: Euro
                    collateral_percentage: 99
                    networks: []
                '4':
                  summary: USDC (token, with contract address)
                  value:
                    code: USDC
                    precision: 6
                    unified_cryptoasset_id: 3408
                    name: USDC
                    collateral_percentage: 0
                    networks:
                      - network: ETHEREUM
                        name: Ethereum
                        is_default: true
                        token_standard: ERC20
                        contract_address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
                        destination_tag_type: null
                '5':
                  summary: XRP (tagged network)
                  value:
                    code: XRP
                    precision: 8
                    unified_cryptoasset_id: 52
                    name: XRP
                    collateral_percentage: 0
                    networks:
                      - network: XRP_LEDGER
                        name: XRP Ledger
                        is_default: true
                        token_standard: null
                        contract_address: null
                        destination_tag_type: destinationTag
          headers: {}
        '400':
          x-apidog-name: Bad Request
          description: Invalid `type` value.
          content:
            application/json:
              schema: &ref_0
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: INVALID_TYPE
          headers: {}
        '500':
          x-apidog-name: Server Error
          description: Unexpected server error. `error` is a human-readable message.
          content:
            application/json:
              schema: *ref_0
              examples:
                '7':
                  summary: Server error
                  value:
                    error: Server error.
                '8':
                  summary: Server configuration error
                  value:
                    error: Server configuration error.
          headers: {}
      security: []
      x-apidog-folder: One Trading Public REST API/Public
      x-apidog-status: released
      x-run-in-apidog: https://app.eu.apidog.com/web/project/349694/apis/api-3612081-run
components:
  schemas:
    Currency:
      type: object
      properties:
        code:
          type: string
          description: Currency code (e.g. `BTC`).
        precision:
          type: integer
          description: Number of decimal places used for the currency.
        unified_cryptoasset_id:
          type: integer
          description: CoinMarketCap unified crypto-asset ID; `0` for fiat currencies.
        name:
          type: string
        collateral_percentage:
          type: integer
          x-apidog-mock: '50'
          minimum: 0
          maximum: 100
          description: >-
            The percentage of the asset's value that can be used as collateral
            for futures positions. Omitted for some assets; treat a missing
            value as 0.
      required:
        - code
        - precision
        - unified_cryptoasset_id
        - name
      description: Currency
      x-apidog-orders:
        - code
        - precision
        - unified_cryptoasset_id
        - name
        - collateral_percentage
      x-apidog-folder: ''
      x-apidog-ignore-properties: []
    ErrorResponse:
      type: object
      description: >-
        Error body. `error` is a machine-readable code (e.g.
        `INVALID_INSTRUMENT_CODE`) on most endpoints; a few older endpoints
        return a human-readable message in `error` instead and omit
        `error_message`.
      properties:
        error:
          type: string
          description: Error code (or, on older endpoints, a human-readable message).
        error_message:
          type: string
          description: >-
            Human-readable detail. Present on endpoints that return an error
            code in `error`.
      required:
        - error
      x-apidog-orders:
        - error
        - error_message
      x-apidog-folder: ''
      x-apidog-ignore-properties: []
  securitySchemes:
    bearerAuth:
      type: bearer
      scheme: bearer
      description: >-
        API key issued to the account holder, sent as `Authorization: Bearer
        <token>`. The key must hold the `SUBACCOUNT_TRANSFER` scope.
    bearer:
      type: bearer
      scheme: bearer
servers:
  - url: https://api.onetrading.com/fast
    description: Production Env
security: []

```