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

# Coinbase Integration for AI Agents & Workflows

> Cryptocurrency trading and wallet management platform for buying, selling, and storing digital assets via the Coinbase Developer Platform (CDP) API.

{/* Self-hosted logo — build-time vendored from modulex.json / Iconify (see scripts/lib/logo.js). */}

<img src="https://mintcdn.com/modulexaillc/zKB2qsP6Q61VNLfB/logos/coinbase.svg?fit=max&auto=format&n=zKB2qsP6Q61VNLfB&q=85&s=dca150959c8130d80e7c04cd01649d84" alt="Coinbase logo" width="72" height="72" data-path="logos/coinbase.svg" />

## Overview

Add **Coinbase** to any ModuleX agent or workflow. Cryptocurrency trading and wallet management via the **Coinbase Developer Platform (CDP) API** (v2 + v3 brokerage). Pure HTTP; the only runtime dependency added is `cryptography` for local JWT signing.

<Info>
  **Categories**: Finance & Payments · Business Services · Finance · Trading · Market · **Auth**: CDP API Key + Secret · **Actions**: 8
</Info>

## Authentication

### CDP API Key + Secret

Authenticate using a Coinbase Developer Platform API key pair: the key ID and either an ECDSA (PEM) or Ed25519 (base64) private key. JWT signing happens locally.

#### Required Credentials

| Field      | Description                                                                               | Required | Format                                    |
| ---------- | ----------------------------------------------------------------------------------------- | -------- | ----------------------------------------- |
| API Key ID | Your Coinbase CDP API Key ID (e.g. organizations/\{org\_id}/apiKeys/\{key\_id})           | Yes      | `organizations/{org_id}/apiKeys/{key_id}` |
| API Secret | Coinbase CDP API Secret (PEM for ECDSA or base64 for Ed25519). Used to sign JWTs locally. | Yes      | `-`                                       |

## Available Actions

<AccordionGroup>
  <Accordion title="get_accounts — List all cryptocurrency accounts for the authenticated user">
    ### Parameters

    <ResponseField name="limit" type="integer">
      Maximum accounts to return (1-100) (Default: `25`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "AccountRow": {
          "additionalProperties": false,
          "properties": {
            "uuid": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Uuid"
            },
            "name": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Name"
            },
            "type": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Type"
            },
            "currency": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Currency"
            },
            "available_balance": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Available Balance"
            },
            "available_balance_currency": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Available Balance Currency"
            },
            "hold_balance": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Hold Balance"
            },
            "hold_balance_currency": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Hold Balance Currency"
            },
            "created_at": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Created At"
            },
            "updated_at": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Updated At"
            },
            "active": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Active"
            },
            "ready": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Ready"
            },
            "default": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Default"
            }
          },
          "title": "AccountRow",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "accounts": {
          "items": {
            "$ref": "#/$defs/AccountRow"
          },
          "title": "Accounts",
          "type": "array"
        },
        "total": {
          "default": 0,
          "title": "Total",
          "type": "integer"
        },
        "has_next": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Has Next"
        },
        "cursor": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Cursor"
        }
      },
      "required": [
        "success"
      ],
      "title": "GetAccountsOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_account — Get details for a specific Coinbase account">
    ### Parameters

    <ResponseField name="account_id" type="string" required>
      The ID of the account
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "AccountRow": {
          "additionalProperties": false,
          "properties": {
            "uuid": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Uuid"
            },
            "name": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Name"
            },
            "type": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Type"
            },
            "currency": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Currency"
            },
            "available_balance": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Available Balance"
            },
            "available_balance_currency": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Available Balance Currency"
            },
            "hold_balance": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Hold Balance"
            },
            "hold_balance_currency": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Hold Balance Currency"
            },
            "created_at": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Created At"
            },
            "updated_at": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Updated At"
            },
            "active": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Active"
            },
            "ready": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Ready"
            },
            "default": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Default"
            }
          },
          "title": "AccountRow",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "account": {
          "anyOf": [
            {
              "$ref": "#/$defs/AccountRow"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "required": [
        "success"
      ],
      "title": "GetAccountOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_transactions — List historical order fills for an account">
    ### Parameters

    <ResponseField name="account_id" type="string" required>
      The ID of the account
    </ResponseField>

    <ResponseField name="limit" type="integer">
      Maximum transactions to return (1-100) (Default: `25`)
    </ResponseField>

    <ResponseField name="starting_after" type="string">
      Pagination cursor (last transaction ID)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "TransactionRow": {
          "additionalProperties": false,
          "properties": {
            "entry_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Entry Id"
            },
            "trade_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Trade Id"
            },
            "order_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Order Id"
            },
            "trade_time": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Trade Time"
            },
            "trade_type": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Trade Type"
            },
            "price": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Price"
            },
            "size": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Size"
            },
            "commission": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Commission"
            },
            "product_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Product Id"
            },
            "sequence_timestamp": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Sequence Timestamp"
            },
            "liquidity_indicator": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Liquidity Indicator"
            },
            "size_in_quote": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Size In Quote"
            },
            "user_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "User Id"
            },
            "side": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Side"
            }
          },
          "title": "TransactionRow",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "transactions": {
          "items": {
            "$ref": "#/$defs/TransactionRow"
          },
          "title": "Transactions",
          "type": "array"
        },
        "total": {
          "default": 0,
          "title": "Total",
          "type": "integer"
        },
        "cursor": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Cursor"
        }
      },
      "required": [
        "success"
      ],
      "title": "GetTransactionsOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="place_buy_order — Place a market buy order (IOC) to purchase cryptocurrency. ``amount`` is the spend in the quote currency (USD).">
    ### Parameters

    <ResponseField name="account_id" type="string" required>
      The ID of the account
    </ResponseField>

    <ResponseField name="amount" type="string" required>
      The amount
    </ResponseField>

    <ResponseField name="currency" type="string" required>
      The currency code (e.g. 'BTC', 'ETH', 'USD')
    </ResponseField>

    <ResponseField name="payment_method" type="string">
      Optional payment method ID
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "$defs": {
        "_OrderInfo": {
          "additionalProperties": false,
          "properties": {
            "order_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Order Id"
            },
            "product_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Product Id"
            },
            "side": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Side"
            },
            "client_order_id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Client Order Id"
            }
          },
          "title": "_OrderInfo",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "order": {
          "anyOf": [
            {
              "$ref": "#/$defs/_OrderInfo"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        }
      },
      "required": [
        "success"
      ],
      "title": "PlaceBuyOrderOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="withdraw_funds — Withdraw cryptocurrency from a Coinbase account to an external destination address.">
    ### Parameters

    <ResponseField name="account_id" type="string" required>
      The ID of the account
    </ResponseField>

    <ResponseField name="amount" type="string" required>
      The amount
    </ResponseField>

    <ResponseField name="currency" type="string" required>
      The currency code (e.g. 'BTC', 'ETH', 'USD')
    </ResponseField>

    <ResponseField name="payment_method" type="string" required>
      Destination address (or payment method ID)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Id"
        },
        "status": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Status"
        },
        "amount": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Amount"
        },
        "asset": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Asset"
        },
        "fee": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Fee"
        },
        "transaction_hash": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Transaction Hash"
        },
        "destination_address": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Destination Address"
        },
        "network": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Network"
        },
        "created_at": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Created At"
        }
      },
      "required": [
        "success"
      ],
      "title": "WithdrawFundsOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_exchange_rates — Get current exchange rates for cryptocurrencies">
    ### Parameters

    <ResponseField name="currency" type="string">
      Base currency for the rate table (Default: `USD`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "currency": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Currency"
        },
        "rates": {
          "additionalProperties": true,
          "title": "Rates",
          "type": "object"
        }
      },
      "required": [
        "success"
      ],
      "title": "GetExchangeRatesOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_spot_price — Get current spot price for a currency pair">
    ### Parameters

    <ResponseField name="currency_pair" type="string" required>
      Currency pair (e.g. 'BTC-USD')
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "base": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Base"
        },
        "currency": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Currency"
        },
        "amount": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Amount"
        }
      },
      "required": [
        "success"
      ],
      "title": "GetSpotPriceOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="get_payment_methods — List all payment methods for the authenticated user">
    ### Response

    ```json theme={null}
    {
      "$defs": {
        "PaymentMethodRow": {
          "additionalProperties": false,
          "properties": {
            "id": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Id"
            },
            "type": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Type"
            },
            "name": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Name"
            },
            "currency": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Currency"
            },
            "allow_buy": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Allow Buy"
            },
            "allow_sell": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Allow Sell"
            },
            "allow_deposit": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Allow Deposit"
            },
            "allow_withdraw": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Allow Withdraw"
            },
            "verified": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "title": "Verified"
            }
          },
          "title": "PaymentMethodRow",
          "type": "object"
        }
      },
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "payment_methods": {
          "items": {
            "$ref": "#/$defs/PaymentMethodRow"
          },
          "title": "Payment Methods",
          "type": "array"
        },
        "total": {
          "default": 0,
          "title": "Total",
          "type": "integer"
        }
      },
      "required": [
        "success"
      ],
      "title": "GetPaymentMethodsOutput",
      "type": "object"
    }
    ```
  </Accordion>
</AccordionGroup>

## Related integrations

<CardGroup cols={3}>
  <Card title="Lemon Squeezy" href="/integrations/tools/lemon-squeezy" />

  <Card title="Nasdaq Data Link" href="/integrations/tools/nasdaq" />

  <Card title="Square" href="/integrations/tools/square" />
</CardGroup>

## Links

* [Coinbase](https://www.coinbase.com)
