> For AI agents: the complete documentation index is available at [llms.txt](https://docs.snaptrade.com/llms.txt). Markdown versions of documentation pages are available by appending .md to the URL path.

# Get crypto pairs

GET https://api.snaptrade.com/accounts/{accountId}/trading/instruments/cryptocurrencyPairs

Searches cryptocurrency pairs instruments accessible to the specified account. Both `base` and `quote` are optional. Omit both for a full list of cryptocurrency pairs.


Reference: https://docs.snaptrade.com/reference/Trading/Trading_searchCryptocurrencyPairInstruments

## Code Examples

### TypeScript

```typescript

import { Snaptrade } from "snaptrade-typescript-sdk";

const snaptrade = new Snaptrade({
  clientId: "PARTNER_CLIENT_ID",
  consumerKey: "CONSUMER_KEY",
});

const response =
  await snaptrade.trading.searchCryptocurrencyPairInstruments(
    {
      accountId:
        "917c8734-8470-4a3e-a18f-57c3f2ee6631",
      userId: "snaptrade-user-123",
      userSecret:
        "adf2aa34-8219-40f7-a6b3-60156985cc61",
      base: "BTC",
      quote: "USD",
    },
  );
console.log(response.data);

```

### Python

```python

from pprint import pprint
from snaptrade_client import SnapTrade

snaptrade = SnapTrade(
    client_id="PARTNER_CLIENT_ID",
    consumer_key="CONSUMER_KEY"
)

response = snaptrade.trading.search_cryptocurrency_pair_instruments(
    account_id="917c8734-8470-4a3e-a18f-57c3f2ee6631",
    user_id="snaptrade-user-123",
    user_secret="adf2aa34-8219-40f7-a6b3-60156985cc61",
    base="BTC",
    quote="USD"
)
pprint(response.body)

```

## OpenAPI Specification

```yaml

openapi: 3.0.0
info:
  description: Connect brokerage accounts to your app for live positions and trading
  version: 1.0.0
  title: SnapTrade
  termsOfService: N/A
  contact:
    email: api@snaptrade.com
  x-konfig-ignore:
    potential-incorrect-type: true
  x-readme:
    explorer-enabled: false
paths:
  /accounts/{accountId}/trading/instruments/cryptocurrencyPairs:
    get:
      tags:
        - Trading
      summary: Get crypto pairs
      description: >
        Searches cryptocurrency pairs instruments accessible to the specified
        account. Both `base` and `quote` are optional. Omit both for a full list
        of cryptocurrency pairs.
      operationId: Trading_searchCryptocurrencyPairInstruments
      parameters:
        - in: query
          required: true
          name: userId
          schema:
            description: >-
              SnapTrade User ID. This is chosen by the API partner and can be
              any string that is a) unique to the user, and b) immutable for the
              user. It is recommended to NOT use email addresses for this
              property because they are usually not immutable.
            type: string
            example: snaptrade-user-123
        - in: query
          required: true
          name: userSecret
          schema:
            description: >-
              SnapTrade User Secret. This is a randomly generated string and
              should be stored securely. If compromised, please rotate it via
              the [rotate user secret
              endpoint](/reference/Authentication/Authentication_resetSnapTradeUserSecret).
            type: string
            example: adf2aa34-8219-40f7-a6b3-60156985cc61
        - in: path
          required: true
          name: accountId
          schema:
            description: >-
              Unique identifier for the connected brokerage account. This is the
              UUID used to reference the account in SnapTrade.
            type: string
            format: uuid
            example: 917c8734-8470-4a3e-a18f-57c3f2ee6631
        - in: query
          required: false
          name: base
          schema:
            description: >
              The base currency of a pair (e.g., "BTC" in BTC/USD). Either fiat
              or cryptocurrency symbol, for fiat use ISO-4217 codes.
            type: string
            example: BTC
        - in: query
          required: false
          name: quote
          schema:
            description: >
              The quote currency of a pair (e.g., "USD" in BTC/USD). Either fiat
              or cryptocurrency symbol, for fiat use ISO-4217 codes.
            type: string
            example: USD
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                  - items
                description: The instruments
                properties:
                  items:
                    type: array
                    items:
                      description: A cryptocurrency pair instrument.
                      type: object
                      required:
                        - base
                        - quote
                      properties:
                        symbol:
                          description: Cryptocurrency pair instrument symbol
                          type: string
                          example: BTC-USD
                        base:
                          description: >
                            The base currency of a pair (e.g., "BTC" in
                            BTC/USD). Either fiat or cryptocurrency symbol, for
                            fiat use ISO-4217 codes.
                          type: string
                          example: BTC
                        quote:
                          description: >
                            The quote currency of a pair (e.g., "USD" in
                            BTC/USD). Either fiat or cryptocurrency symbol, for
                            fiat use ISO-4217 codes.
                          type: string
                          example: USD
                        increment:
                          nullable: true
                          allOf:
                            - description: >
                                The precision or smallest price incremental step
                                available for this cryptocurrency pair
                              type: string
                              example: '0.001'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                description: Example for failed request response
                type: object
                properties:
                  default_detail:
                    example: Unable to verify data sent
                  default_code:
                    example: 1076
        '500':
          description: Unexpected Error

```