Coinbase Transactions API

View and create transactions including withdrawals and transfers.

OpenAPI Specification

coinbase-transactions-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Coinbase Advanced Trade Accounts Transactions API
  description: The Coinbase Advanced Trade API provides programmatic access to advanced trading features on the Coinbase platform. Developers can automate market, limit, and stop-limit orders, manage portfolios, retrieve real-time and historical market data, and monitor fees. The REST API is available at api.coinbase.com/api/v3/brokerage and supports authenticated access using API keys with HMAC SHA-256 signatures. Public market data endpoints do not require authentication.
  version: '3.0'
  contact:
    name: Coinbase Developer Support
    url: https://help.coinbase.com
  termsOfService: https://www.coinbase.com/legal/user-agreement
servers:
- url: https://api.coinbase.com/api/v3/brokerage
  description: Production Server
security:
- apiKeyAuth: []
tags:
- name: Transactions
  description: View and create transactions including withdrawals and transfers.
paths:
  /portfolios/{portfolio_id}/transactions:
    get:
      operationId: listTransactions
      summary: List transactions
      description: Retrieves a list of transactions for a portfolio including deposits, withdrawals, and internal transfers.
      tags:
      - Transactions
      parameters:
      - $ref: '#/components/parameters/PortfolioIdParam'
      - name: symbols
        in: query
        description: Filter by currency symbols
        schema:
          type: string
      - name: types
        in: query
        description: Filter by transaction types
        schema:
          type: array
          items:
            type: string
            enum:
            - DEPOSIT
            - WITHDRAWAL
            - INTERNAL_DEPOSIT
            - INTERNAL_WITHDRAWAL
      - name: start_time
        in: query
        description: Start time filter
        schema:
          type: string
          format: date-time
      - name: end_time
        in: query
        description: End time filter
        schema:
          type: string
          format: date-time
      - $ref: '#/components/parameters/CursorParam'
      - $ref: '#/components/parameters/LimitParam'
      - $ref: '#/components/parameters/SortDirectionParam'
      responses:
        '200':
          description: Successfully retrieved transactions
          content:
            application/json:
              schema:
                type: object
                properties:
                  transactions:
                    type: array
                    items:
                      $ref: '#/components/schemas/Transaction'
                  pagination:
                    $ref: '#/components/schemas/Pagination'
  /portfolios/{portfolio_id}/transactions/{transaction_id}:
    get:
      operationId: getTransaction
      summary: Get transaction
      description: Retrieves details of a specific transaction by its transaction ID.
      tags:
      - Transactions
      parameters:
      - $ref: '#/components/parameters/PortfolioIdParam'
      - name: transaction_id
        in: path
        required: true
        description: Transaction identifier
        schema:
          type: string
      responses:
        '200':
          description: Successfully retrieved transaction
          content:
            application/json:
              schema:
                type: object
                properties:
                  transaction:
                    $ref: '#/components/schemas/Transaction'
  /portfolios/{portfolio_id}/wallets/{wallet_id}/transactions:
    post:
      operationId: createWithdrawal
      summary: Create withdrawal
      description: Creates a withdrawal from a specific wallet to an approved address in the address book.
      tags:
      - Transactions
      parameters:
      - $ref: '#/components/parameters/PortfolioIdParam'
      - name: wallet_id
        in: path
        required: true
        description: Wallet identifier
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - amount
              - destination_type
              - idempotency_key
              properties:
                amount:
                  type: string
                  description: Amount to withdraw
                destination_type:
                  type: string
                  description: Destination type
                  enum:
                  - ADDRESS_BOOK
                  - DESTINATION
                idempotency_key:
                  type: string
                  description: Unique key for idempotent withdrawal
                currency_symbol:
                  type: string
                  description: Currency symbol
      responses:
        '200':
          description: Withdrawal created
          content:
            application/json:
              schema:
                type: object
                properties:
                  activity_id:
                    type: string
                    description: Activity ID for tracking
components:
  schemas:
    Transaction:
      type: object
      description: A deposit, withdrawal, or transfer transaction
      properties:
        id:
          type: string
          description: Transaction identifier
        wallet_id:
          type: string
          description: Associated wallet ID
        portfolio_id:
          type: string
          description: Portfolio ID
        type:
          type: string
          description: Transaction type
          enum:
          - DEPOSIT
          - WITHDRAWAL
          - INTERNAL_DEPOSIT
          - INTERNAL_WITHDRAWAL
        status:
          type: string
          description: Transaction status
        symbol:
          type: string
          description: Currency symbol
        amount:
          type: string
          description: Transaction amount
        fee:
          type: string
          description: Transaction fee
        created_at:
          type: string
          format: date-time
          description: When the transaction was created
        completed_at:
          type: string
          format: date-time
          description: When the transaction completed
        blockchain_ids:
          type: array
          description: Associated blockchain transaction IDs
          items:
            type: string
    Pagination:
      type: object
      description: Pagination information for list responses
      properties:
        next_cursor:
          type: string
          description: Cursor for the next page
        sort_direction:
          type: string
          description: Sort direction
        has_next:
          type: boolean
          description: Whether there are more results
  parameters:
    CursorParam:
      name: cursor
      in: query
      description: Cursor for pagination
      schema:
        type: string
    SortDirectionParam:
      name: sort_direction
      in: query
      description: Sort direction for results
      schema:
        type: string
        enum:
        - ASC
        - DESC
        default: DESC
    LimitParam:
      name: limit
      in: query
      description: Maximum number of results to return
      schema:
        type: integer
        minimum: 1
        maximum: 3000
        default: 100
    PortfolioIdParam:
      name: portfolio_id
      in: path
      required: true
      description: Portfolio identifier
      schema:
        type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: CB-ACCESS-KEY
      description: Coinbase API key authentication using HMAC SHA-256 signatures. Requires CB-ACCESS-KEY, CB-ACCESS-SIGN, and CB-ACCESS-TIMESTAMP headers.
externalDocs:
  description: Coinbase Advanced Trade API Documentation
  url: https://docs.cdp.coinbase.com/coinbase-app/advanced-trade-apis/rest-api