REST API Client

RESTClient Constructor

coinbase.rest.rest_base.RESTBase(api_key: str | None = None, api_secret: str | None = None, key_file: IO | str | None = None, base_url='api.coinbase.com', timeout: int | None = None, verbose: bool | None = False)[source]

RESTClient

Initialize using RESTClient


Parameters:

  • api_key | Optional (str) - The API key

  • api_secret | Optional (str) - The API key secret

  • key_file | Optional (IO | str) - Path to API key file or file-like object

  • base_url | (str) - The base URL for REST requests. Default set to “https://api.coinbase.com

  • timeout | Optional (int) - Set timeout in seconds for REST requests

  • verbose | Optional (bool) - Enables debug logging. Default set to False

REST Utils

coinbase.rest.rest_base.RESTBase.get(self, url_path, params: dict | None = None, public=False, **kwargs) Dict[str, Any]

GET Request


Parameters:

  • url_path | (str) - the URL path

  • params | Optional ([dict]) - the query parameters

  • public | (bool) - flag indicating whether to treat endpoint as public

coinbase.rest.rest_base.RESTBase.post(self, url_path, params: dict | None = None, data: dict | None = None, **kwargs) Dict[str, Any]

Authenticated POST Request


Parameters:

  • url_path | (str) - the URL path

  • params | Optional ([dict]) - the query parameters

  • data | Optional ([dict]) - the request body

coinbase.rest.rest_base.RESTBase.put(self, url_path, params: dict | None = None, data: dict | None = None, **kwargs) Dict[str, Any]

Authenticated PUT Request


Parameters:

  • url_path | (str) - the URL path

  • params | Optional ([dict]) - the query parameters

  • data | Optional ([dict]) - the request body

coinbase.rest.rest_base.RESTBase.delete(self, url_path, params: dict | None = None, data: dict | None = None, **kwargs) Dict[str, Any]

Authenticated DELETE Request


Parameters:

  • url_path | (str) - the URL path

  • params | Optional ([dict]) - the query parameters

  • data | Optional ([dict]) - the request body

Accounts

coinbase.rest.accounts.get_accounts(self, limit: int | None = None, cursor: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

List Accounts

[GET] https://api.coinbase.com/api/v3/brokerage/accounts


Description:

Get a list of authenticated accounts for the current user.


Read more on the official documentation: List Accounts

coinbase.rest.accounts.get_account(self, account_uuid: str, **kwargs) Dict[str, Any][source]

Get Account

[GET] https://api.coinbase.com/api/v3/brokerage/accounts/{account_uuid}


Description:

Get a list of information about an account, given an account UUID.


Read more on the official documentation: Get Account

Products

coinbase.rest.products.get_products(self, limit: int | None = None, offset: int | None = None, product_type: str | None = None, product_ids: List[str] | None = None, contract_expiry_type: str | None = None, expiring_contract_status: str | None = None, **kwargs) Dict[str, Any][source]

List Products

[GET] https://api.coinbase.com/api/v3/brokerage/products


Description:

Get a list of the available currency pairs for trading.


Read more on the official documentation: List Products

coinbase.rest.products.get_product(self, product_id: str, **kwargs) Dict[str, Any][source]

Get Product

[GET] https://api.coinbase.com/api/v3/brokerage/products/{product_id}


Description:

Get information on a single product by product ID.


Read more on the official documentation: Get Product

coinbase.rest.products.get_product_book(self, product_id: str, limit: int | None = None, **kwargs) Dict[str, Any][source]

Get Product Book

[GET] https://api.coinbase.com/api/v3/brokerage/product_book


Description:

Get a list of bids/asks for a single product. The amount of detail shown can be customized with the limit parameter.


Read more on the official documentation: Get Product Book

coinbase.rest.products.get_best_bid_ask(self, product_ids: List[str] | None = None, **kwargs) Dict[str, Any][source]

Get Best Bid/Ask

[GET] https://api.coinbase.com/api/v3/brokerage/best_bid_ask


Description:

Get the best bid/ask for all products. A subset of all products can be returned instead by using the product_ids input.


Read more on the official documentation: Get Best Bid/Ask

Market Data

coinbase.rest.market_data.get_candles(self, product_id: str, start: str, end: str, granularity: str, **kwargs) Dict[str, Any][source]

Get Product Candles

[GET] https://api.coinbase.com/api/v3/brokerage/products/{product_id}/candles


Description:

Get rates for a single product by product ID, grouped in buckets.


Read more on the official documentation: Get Product Candles

coinbase.rest.market_data.get_market_trades(self, product_id: str, limit: int, start: str | None = None, end: str | None = None, **kwargs) Dict[str, Any][source]

Get Market Trades

[GET] https://api.coinbase.com/api/v3/brokerage/products/{product_id}/ticker


Description:

Get snapshot information, by product ID, about the last trades (ticks), best bid/ask, and 24h volume.


Read more on the official documentation: Get Market Trades

Orders

coinbase.rest.orders.create_order(self, client_order_id: str, product_id: str, side: str, order_configuration, self_trade_prevention_id: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Create Order

[POST] https://api.coinbase.com/api/v3/brokerage/orders


Description:

Create an order with a specified product_id (asset-pair), side (buy/sell), etc.


Read more on the official documentation: Create Order

coinbase.rest.orders.market_order(self, client_order_id: str, product_id: str, side: str, quote_size: str | None = None, base_size: str | None = None, self_trade_prevention_id: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Market Order

[POST] https://api.coinbase.com/api/v3/brokerage/orders


Description:

Place a market order to BUY or SELL the desired product at the given market price. If you wish to purchase the product, provide a quote_size and if you wish to sell the product, provide a base_size.


Read more on the official documentation: Create Order

coinbase.rest.orders.market_order_buy(self, client_order_id: str, product_id: str, quote_size: str, self_trade_prevention_id: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Create Market Order Buy

[POST] https://api.coinbase.com/api/v3/brokerage/orders


Description:

Place a market order to BUY the desired product at the given market price.


Read more on the official documentation: Create Order

coinbase.rest.orders.market_order_sell(self, client_order_id: str, product_id: str, base_size: str, self_trade_prevention_id: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Create Market Order Sell

[POST] https://api.coinbase.com/api/v3/brokerage/orders


Description:

Place a market order to SELL the desired product at the given market price.


Read more on the official documentation: Create Order

coinbase.rest.orders.limit_order_ioc(self, client_order_id: str, product_id: str, side: str, base_size: str, limit_price: str, self_trade_prevention_id: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Limit IOC Order

[POST] https://api.coinbase.com/api/v3/brokerage/orders


Description:

Place a Limit Order with a IOC time-in-force policy. Provide the base_size (quantity of your base currency to spend) as well as a limit_price that indicates the maximum price at which the order should be filled.


Read more on the official documentation: Create Order

coinbase.rest.orders.limit_order_ioc_buy(self, client_order_id: str, product_id: str, base_size: str, limit_price: str, self_trade_prevention_id: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Limit IOC Order Buy

[POST] https://api.coinbase.com/api/v3/brokerage/orders


Description:

Place a Buy Limit Order with a IOC time-in-force policy. Provide the base_size (quantity of your base currency to spend) as well as a limit_price that indicates the maximum price at which the order should be filled.


Read more on the official documentation: Create Order

coinbase.rest.orders.limit_order_ioc_sell(self, client_order_id: str, product_id: str, base_size: str, limit_price: str, self_trade_prevention_id: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Limit IOC Order Sell

[POST] https://api.coinbase.com/api/v3/brokerage/orders


Description:

Place a Sell Limit Order with a IOC time-in-force policy. Provide the base_size (quantity of your base currency to spend) as well as a limit_price that indicates the maximum price at which the order should be filled.


Read more on the official documentation: Create Order

coinbase.rest.orders.limit_order_gtc(self, client_order_id: str, product_id: str, side: str, base_size: str, limit_price: str, post_only: bool = False, self_trade_prevention_id: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Limit Order GTC

[POST] https://api.coinbase.com/api/v3/brokerage/orders


Description:

Place a Limit Order with a GTC time-in-force policy. Provide the base_size (quantity of your base currency to spend) as well as a limit_price that indicates the maximum price at which the order should be filled.


Read more on the official documentation: Create Order

coinbase.rest.orders.limit_order_gtc_buy(self, client_order_id: str, product_id: str, base_size: str, limit_price: str, post_only: bool = False, self_trade_prevention_id: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Limit Order GTC Buy

[POST] https://api.coinbase.com/api/v3/brokerage/orders


Description:

Place a BUY Limit Order with a GTC time-in-force policy. Provide the base_size (quantity of your base currency to spend) as well as a limit_price that indicates the maximum price at which the order should be filled.


Read more on the official documentation: Create Order

coinbase.rest.orders.limit_order_gtc_sell(self, client_order_id: str, product_id: str, base_size: str, limit_price: str, post_only: bool = False, self_trade_prevention_id: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Limit Order GTC Sell

[POST] https://api.coinbase.com/api/v3/brokerage/orders


Description:

Place a SELL Limit Order with a GTC time-in-force policy. Provide the base_size (quantity of your base currency to spend) as well as a limit_price that indicates the maximum price at which the order should be filled.


Read more on the official documentation: Create Order

coinbase.rest.orders.limit_order_gtd(self, client_order_id: str, product_id: str, side: str, base_size: str, limit_price: str, end_time: str, post_only: bool = False, self_trade_prevention_id: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Limit Order GTD

[POST] https://api.coinbase.com/api/v3/brokerage/orders


Description:

Place a Limit Order with a GTD time-in-force policy. Unlike a Limit Order with a GTC time-in-force policy, this order type requires an end-time that indicates when this order should expire.


Read more on the official documentation: Create Order

coinbase.rest.orders.limit_order_gtd_buy(self, client_order_id: str, product_id: str, base_size: str, limit_price: str, end_time: str, post_only: bool = False, self_trade_prevention_id: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Limit Order GTD Buy

[POST] https://api.coinbase.com/api/v3/brokerage/orders


Description:

Place a BUY Limit Order with a GTD time-in-force policy. Unlike a Limit Order with a GTC time-in-force policy, this order type requires an end-time that indicates when this order should expire.


Read more on the official documentation: Create Order

coinbase.rest.orders.limit_order_gtd_sell(self, client_order_id: str, product_id: str, base_size: str, limit_price: str, end_time: str, post_only: bool = False, self_trade_prevention_id: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Limit Order GTD Sell

[POST] https://api.coinbase.com/api/v3/brokerage/orders


Description:

Place a SELL Limit Order with a GTD time-in-force policy. Unlike a Limit Order with a GTC time-in-force policy, this order type requires an end-time that indicates when this order should expire.


Read more on the official documentation: Create Order

coinbase.rest.orders.limit_order_fok(self, client_order_id: str, product_id: str, side: str, base_size: str, limit_price: str, self_trade_prevention_id: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Limit FOK Order

[POST] https://api.coinbase.com/api/v3/brokerage/orders


Description:

Place a Limit Order with a FOK time-in-force policy. Provide the base_size (quantity of your base currency to spend) as well as a limit_price that indicates the maximum price at which the order should be filled.


Read more on the official documentation: Create Order

coinbase.rest.orders.limit_order_fok_buy(self, client_order_id: str, product_id: str, base_size: str, limit_price: str, self_trade_prevention_id: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Limit FOK Order Buy

[POST] https://api.coinbase.com/api/v3/brokerage/orders


Description:

Place a Buy Limit Order with a FOK time-in-force policy. Provide the base_size (quantity of your base currency to spend) as well as a limit_price that indicates the maximum price at which the order should be filled.


Read more on the official documentation: Create Order

coinbase.rest.orders.limit_order_fok_sell(self, client_order_id: str, product_id: str, base_size: str, limit_price: str, self_trade_prevention_id: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Limit FOK Order Sell

[POST] https://api.coinbase.com/api/v3/brokerage/orders


Description:

Place a Sell Limit Order with a FOK time-in-force policy. Provide the base_size (quantity of your base currency to spend) as well as a limit_price that indicates the maximum price at which the order should be filled.


Read more on the official documentation: Create Order

coinbase.rest.orders.stop_limit_order_gtc(self, client_order_id: str, product_id: str, side: str, base_size: str, limit_price: str, stop_price: str, stop_direction: str, self_trade_prevention_id: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Stop-Limit Order GTC

[POST] https://api.coinbase.com/api/v3/brokerage/orders


Description:

Place a Stop Limit order with a GTC time-in-force policy. Stop orders become active and wait to trigger based on the movement of the last trade price. The last trade price is the last price at which an order was filled.


Read more on the official documentation: Create Order

coinbase.rest.orders.stop_limit_order_gtc_buy(self, client_order_id: str, product_id: str, base_size: str, limit_price: str, stop_price: str, stop_direction: str, self_trade_prevention_id: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Stop-Limit Order GTC Buy

[POST] https://api.coinbase.com/api/v3/brokerage/orders


Description:

Place a BUY Stop Limit order with a GTC time-in-force policy. Stop orders become active and wait to trigger based on the movement of the last trade price. The last trade price is the last price at which an order was filled.


Read more on the official documentation: Create Order

coinbase.rest.orders.stop_limit_order_gtc_sell(self, client_order_id: str, product_id: str, base_size: str, limit_price: str, stop_price: str, stop_direction: str, self_trade_prevention_id: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Stop-Limit Order GTC Sell

[POST] https://api.coinbase.com/api/v3/brokerage/orders


Description:

Place a SELL Stop Limit order with a GTC time-in-force policy. Stop orders become active and wait to trigger based on the movement of the last trade price. The last trade price is the last price at which an order was filled.


Read more on the official documentation: Create Order

coinbase.rest.orders.stop_limit_order_gtd(self, client_order_id: str, product_id: str, side: str, base_size: str, limit_price: str, stop_price: str, end_time: str, stop_direction: str, self_trade_prevention_id: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Stop-Limit Order GTD

[POST] https://api.coinbase.com/api/v3/brokerage/orders


Description:

Place a Stop Limit order with a GTD time-in-force policy. Stop orders become active and wait to trigger based on the movement of the last trade price. The last trade price is the last price at which an order was filled.


Read more on the official documentation: Create Order

coinbase.rest.orders.stop_limit_order_gtd_buy(self, client_order_id: str, product_id: str, base_size: str, limit_price: str, stop_price: str, end_time: str, stop_direction: str, self_trade_prevention_id: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Stop-Limit Order GTD Buy

[POST] https://api.coinbase.com/api/v3/brokerage/orders


Description:

Place a BUY Stop Limit order with a GTD time-in-force policy. Stop orders become active and wait to trigger based on the movement of the last trade price. The last trade price is the last price at which an order was filled.


Read more on the official documentation: Create Order

coinbase.rest.orders.stop_limit_order_gtd_sell(self, client_order_id: str, product_id: str, base_size: str, limit_price: str, stop_price: str, end_time: str, stop_direction: str, self_trade_prevention_id: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Stop-Limit Order GTD Sell

[POST] https://api.coinbase.com/api/v3/brokerage/orders


Description:

Place a SELL Stop Limit order with a GTD time-in-force policy. Stop orders become active and wait to trigger based on the movement of the last trade price. The last trade price is the last price at which an order was filled.


Read more on the official documentation: Create Order

coinbase.rest.orders.trigger_bracket_order_gtc(self, client_order_id: str, product_id: str, side: str, base_size: str, limit_price: str, stop_trigger_price: str, self_trade_prevention_id: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Trigger Bracket Order GTC

[POST] https://api.coinbase.com/api/v3/brokerage/orders


Description:

Place a Trigger Bracket order with a GTC time-in-force policy. Trigger Bracket orders become active and wait to trigger based on the movement of the last trade price. The last trade price is the last price at which an order was filled.


Read more on the official documentation: Create Order

coinbase.rest.orders.trigger_bracket_order_gtc_buy(self, client_order_id: str, product_id: str, base_size: str, limit_price: str, stop_trigger_price: str, self_trade_prevention_id: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Trigger Bracket Order GTC Buy

[POST] https://api.coinbase.com/api/v3/brokerage/orders


Description:

Place a BUY Trigger Bracket order with a GTC time-in-force policy. Trigger Bracket orders become active and wait to trigger based on the movement of the last trade price. The last trade price is the last price at which an order was filled.


Read more on the official documentation: Create Order

coinbase.rest.orders.trigger_bracket_order_gtc_sell(self, client_order_id: str, product_id: str, base_size: str, limit_price: str, stop_trigger_price: str, self_trade_prevention_id: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Trigger Bracket Order GTC Sell

[POST] https://api.coinbase.com/api/v3/brokerage/orders


Description:

Place a SELL Trigger Bracket order with a GTC time-in-force policy. Trigger Bracket orders become active and wait to trigger based on the movement of the last trade price. The last trade price is the last price at which an order was filled.


Read more on the official documentation: Create Order

coinbase.rest.orders.trigger_bracket_order_gtd(self, client_order_id: str, product_id: str, side: str, base_size: str, limit_price: str, stop_trigger_price: str, end_time: str, self_trade_prevention_id: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Trigger Bracket Order GTD

[POST] https://api.coinbase.com/api/v3/brokerage/orders


Description:

Place a Trigger Bracket order with a GTD time-in-force policy. Trigger Bracket orders become active and wait to trigger based on the movement of the last trade price. The last trade price is the last price at which an order was filled.


Read more on the official documentation: Create Order

coinbase.rest.orders.trigger_bracket_order_gtd_buy(self, client_order_id: str, product_id: str, base_size: str, limit_price: str, stop_trigger_price: str, end_time: str, self_trade_prevention_id: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Trigger Bracket Order GTD Buy

[POST] https://api.coinbase.com/api/v3/brokerage/orders


Description:

Place a BUY Trigger Bracket order with a GTD time-in-force policy. Trigger Bracket orders become active and wait to trigger based on the movement of the last trade price. The last trade price is the last price at which an order was filled.


Read more on the official documentation: Create Order

coinbase.rest.orders.trigger_bracket_order_gtd_sell(self, client_order_id: str, product_id: str, base_size: str, limit_price: str, stop_trigger_price: str, end_time: str, self_trade_prevention_id: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Trigger Bracket Order GTD Sell

[POST] https://api.coinbase.com/api/v3/brokerage/orders


Description:

Place a SELL Trigger Bracket order with a GTD time-in-force policy. Trigger Bracket orders become active and wait to trigger based on the movement of the last trade price. The last trade price is the last price at which an order was filled.


Read more on the official documentation: Create Order

coinbase.rest.orders.get_order(self, order_id: str, **kwargs) Dict[str, Any][source]

Get Order

[GET] https://api.coinbase.com/api/v3/brokerage/orders/historical/{order_id}


Description:

Get a single order by order ID.


Read more on the official documentation: Get Order

coinbase.rest.orders.list_orders(self, product_id: str | None = None, order_status: List[str] | None = None, limit: int | None = None, start_date: str | None = None, end_date: str | None = None, order_type: str | None = None, order_side: str | None = None, cursor: str | None = None, product_type: str | None = None, order_placement_source: str | None = None, contract_expiry_type: str | None = None, asset_filters: List[str] | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

List Orders

[GET] https://api.coinbase.com/api/v3/brokerage/orders/historical/batch


Description:

Get a list of orders filtered by optional query parameters (product_id, order_status, etc).


Read more on the official documentation: List Orders

coinbase.rest.orders.get_fills(self, order_id: str | None = None, product_id: str | None = None, start_sequence_timestamp: str | None = None, end_sequence_timestamp: str | None = None, limit: int | None = None, cursor: str | None = None, **kwargs) Dict[str, Any][source]

List Fills

[GET] https://api.coinbase.com/api/v3/brokerage/orders/historical/fills


Description:

Get a list of fills filtered by optional query parameters (product_id, order_id, etc).


Read more on the official documentation: List Fills

coinbase.rest.orders.edit_order(self, order_id: str, size: str | None = None, price: str | None = None, **kwargs) Dict[str, Any][source]

Edit Order

[POST] https://api.coinbase.com/api/v3/brokerage/orders/edit


Description:

Edit an order with a specified new size, or new price. Only limit order types, with time in force type of good-till-cancelled can be edited.


Read more on the official documentation: Edit Order

coinbase.rest.orders.preview_edit_order(self, order_id: str, size: str | None = None, price: str | None = None, **kwargs) Dict[str, Any][source]

Preview Edit Order

[POST] https://api.coinbase.com/api/v3/brokerage/orders/edit_preview


Description:

Simulate an edit order request with a specified new size, or new price, to preview the result of an edit. Only limit order types, with time in force type of good-till-cancelled can be edited.


Read more on the official documentation: Edit Order Preview

coinbase.rest.orders.cancel_orders(self, order_ids: List[str], **kwargs) Dict[str, Any][source]

Cancel Orders

[POST] https://api.coinbase.com/api/v3/brokerage/orders/batch_cancel


Description:

Initiate cancel requests for one or more orders.


Read more on the official documentation: Cancel Orders

coinbase.rest.orders.preview_order(self, product_id: str, side: str, order_configuration, commission_rate: str | None = None, is_max: bool | None = False, tradable_balance: str | None = None, skip_fcm_risk_check: bool | None = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Preview Order

[POST] https://api.coinbase.com/api/v3/brokerage/orders/preview


Description:

Preview the results of an order request before sending.


Read more on the official documentation: Preview Order

coinbase.rest.orders.preview_market_order(self, product_id: str, side: str, quote_size: str | None = None, base_size: str | None = None, commission_rate: str | None = None, is_max: bool | None = False, tradable_balance: str | None = None, skip_fcm_risk_check: bool | None = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Preview Market Order

[POST] https://api.coinbase.com/api/v3/brokerage/orders/preview


Description:

Preview the results of a market order request before sending.


Read more on the official documentation: Preview Order

coinbase.rest.orders.preview_market_order_buy(self, product_id: str, quote_size: str | None = None, commission_rate: str | None = None, is_max: bool | None = False, tradable_balance: str | None = None, skip_fcm_risk_check: bool | None = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Preview Market Buy Order

[POST] https://api.coinbase.com/api/v3/brokerage/orders/preview


Description:

Preview the results of a market order buy request before sending.


Read more on the official documentation: Preview Order

coinbase.rest.orders.preview_market_order_sell(self, product_id: str, base_size: str, commission_rate: str | None = None, is_max: bool | None = False, tradable_balance: str | None = None, skip_fcm_risk_check: bool | None = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Preview Market Sell Order

[POST] https://api.coinbase.com/api/v3/brokerage/orders/preview


Description:

Preview the results of a market order sell request before sending.


Read more on the official documentation: Preview Order

coinbase.rest.orders.preview_limit_order_ioc(self, product_id: str, side: str, base_size: str, limit_price: str, commission_rate: str | None = None, is_max: bool | None = False, tradable_balance: str | None = None, skip_fcm_risk_check: bool | None = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Preview Limit Order IOC

[POST] https://api.coinbase.com/api/v3/brokerage/orders/preview


Description:

Preview the results of a limit order IOC request before sending.


Read more on the official documentation: Preview Order

coinbase.rest.orders.preview_limit_order_ioc_buy(self, product_id: str, base_size: str, limit_price: str, commission_rate: str | None = None, is_max: bool | None = False, tradable_balance: str | None = None, skip_fcm_risk_check: bool | None = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Preview Limit Order IOC Buy

[POST] https://api.coinbase.com/api/v3/brokerage/orders/preview


Description:

Preview the results of a limit order IOC buy request before sending.


Read more on the official documentation: Preview Order

coinbase.rest.orders.preview_limit_order_ioc_sell(self, product_id: str, base_size: str, limit_price: str, commission_rate: str | None = None, is_max: bool | None = False, tradable_balance: str | None = None, skip_fcm_risk_check: bool | None = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Preview Limit Order IOC Sell

[POST] https://api.coinbase.com/api/v3/brokerage/orders/preview


Description:

Preview the results of a limit order IOC sell request before sending.


Read more on the official documentation: Preview Order

coinbase.rest.orders.preview_limit_order_gtc(self, product_id: str, side: str, base_size: str, limit_price: str, post_only: bool = False, commission_rate: str | None = None, is_max: bool | None = False, tradable_balance: str | None = None, skip_fcm_risk_check: bool | None = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Preview Limit Order GTC

[POST] https://api.coinbase.com/api/v3/brokerage/orders/preview


Description:

Preview the results of a limit order GTC request before sending.


Read more on the official documentation: Preview Order

coinbase.rest.orders.preview_limit_order_gtc_buy(self, product_id: str, base_size: str, limit_price: str, post_only: bool = False, commission_rate: str | None = None, is_max: bool | None = False, tradable_balance: str | None = None, skip_fcm_risk_check: bool | None = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Preview Limit Order GTC Buy

[POST] https://api.coinbase.com/api/v3/brokerage/orders/preview


Description:

Preview the results of a limit order GTC buy request before sending.


Read more on the official documentation: Preview Order

coinbase.rest.orders.preview_limit_order_gtc_sell(self, product_id: str, base_size: str, limit_price: str, post_only: bool = False, commission_rate: str | None = None, is_max: bool | None = False, tradable_balance: str | None = None, skip_fcm_risk_check: bool | None = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Preview Limit Order GTC Sell

[POST] https://api.coinbase.com/api/v3/brokerage/orders/preview


Description:

Preview the results of a limit order GTC sell request before sending.


Read more on the official documentation: Preview Order

coinbase.rest.orders.preview_limit_order_gtd(self, product_id: str, side: str, base_size: str, limit_price: str, end_time: str, post_only: bool = False, commission_rate: str | None = None, is_max: bool | None = False, tradable_balance: str | None = None, skip_fcm_risk_check: bool | None = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Preview Limit Order GTD

[POST] https://api.coinbase.com/api/v3/brokerage/orders/preview


Description:

Preview the results of a limit order GTD request before sending.


Read more on the official documentation: Preview Order

coinbase.rest.orders.preview_limit_order_gtd_buy(self, product_id: str, base_size: str, limit_price: str, end_time: str, post_only: bool = False, commission_rate: str | None = None, is_max: bool | None = False, tradable_balance: str | None = None, skip_fcm_risk_check: bool | None = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Preview Limit Order GTD Buy

[POST] https://api.coinbase.com/api/v3/brokerage/orders/preview


Description:

Preview the results of a limit order GTD buy request before sending.


Read more on the official documentation: Preview Order

coinbase.rest.orders.preview_limit_order_gtd_sell(self, product_id: str, base_size: str, limit_price: str, end_time: str, post_only: bool = False, commission_rate: str | None = None, is_max: bool | None = False, tradable_balance: str | None = None, skip_fcm_risk_check: bool | None = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Preview Limit Order GTD Sell

[POST] https://api.coinbase.com/api/v3/brokerage/orders/preview


Description:

Preview the results of a limit order GTD sell request before sending.


Read more on the official documentation: Preview Order

coinbase.rest.orders.preview_limit_order_fok(self, product_id: str, side: str, base_size: str, limit_price: str, commission_rate: str | None = None, is_max: bool | None = False, tradable_balance: str | None = None, skip_fcm_risk_check: bool | None = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Preview Limit Order FOK

[POST] https://api.coinbase.com/api/v3/brokerage/orders/preview


Description:

Preview the results of a limit order FOK request before sending.


Read more on the official documentation: Preview Order

coinbase.rest.orders.preview_limit_order_fok_buy(self, product_id: str, base_size: str, limit_price: str, commission_rate: str | None = None, is_max: bool | None = False, tradable_balance: str | None = None, skip_fcm_risk_check: bool | None = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Preview Limit Order FOK Buy

[POST] https://api.coinbase.com/api/v3/brokerage/orders/preview


Description:

Preview the results of a limit order FOK buy request before sending.


Read more on the official documentation: Preview Order

coinbase.rest.orders.preview_limit_order_fok_sell(self, product_id: str, base_size: str, limit_price: str, commission_rate: str | None = None, is_max: bool | None = False, tradable_balance: str | None = None, skip_fcm_risk_check: bool | None = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Preview Limit Order FOK Sell

[POST] https://api.coinbase.com/api/v3/brokerage/orders/preview


Description:

Preview the results of a limit order FOK sell request before sending.


Read more on the official documentation: Preview Order

coinbase.rest.orders.preview_stop_limit_order_gtc(self, product_id: str, side: str, base_size: str, limit_price: str, stop_price: str, stop_direction: str, commission_rate: str | None = None, is_max: bool | None = False, tradable_balance: str | None = None, skip_fcm_risk_check: bool | None = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Preview Stop-Limit Order GTC

[POST] https://api.coinbase.com/api/v3/brokerage/orders/preview


Description:

Preview the results of a stop limit GTC order request before sending.


Read more on the official documentation: Preview Order

coinbase.rest.orders.preview_stop_limit_order_gtc_buy(self, product_id: str, base_size: str, limit_price: str, stop_price: str, stop_direction: str, commission_rate: str | None = None, is_max: bool | None = False, tradable_balance: str | None = None, skip_fcm_risk_check: bool | None = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Preview Stop-Limit Order GTC Buy

[POST] https://api.coinbase.com/api/v3/brokerage/orders/preview


Description:

Preview the results of a stop limit GTC order buy request before sending.


Read more on the official documentation: Preview Order

coinbase.rest.orders.preview_stop_limit_order_gtc_sell(self, product_id: str, base_size: str, limit_price: str, stop_price: str, stop_direction: str, commission_rate: str | None = None, is_max: bool | None = False, tradable_balance: str | None = None, skip_fcm_risk_check: bool | None = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Preview Stop-Limit Order GTC Sell

[POST] https://api.coinbase.com/api/v3/brokerage/orders/preview


Description:

Preview the results of a stop limit GTC order sell request before sending.


Read more on the official documentation: Preview Order

coinbase.rest.orders.preview_stop_limit_order_gtd(self, product_id: str, side: str, base_size: str, limit_price: str, stop_price: str, end_time: str, stop_direction: str, commission_rate: str | None = None, is_max: bool | None = False, tradable_balance: str | None = None, skip_fcm_risk_check: bool | None = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Preview Stop-Limit Order GTD

[POST] https://api.coinbase.com/api/v3/brokerage/orders/preview


Description:

Preview the results of a stop limit GTD order request before sending.


Read more on the official documentation: Preview Order

coinbase.rest.orders.preview_stop_limit_order_gtd_buy(self, product_id: str, base_size: str, limit_price: str, stop_price: str, end_time: str, stop_direction: str, commission_rate: str | None = None, is_max: bool | None = False, tradable_balance: str | None = None, skip_fcm_risk_check: bool | None = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Preview Stop-Limit Order GTD Buy

[POST] https://api.coinbase.com/api/v3/brokerage/orders/preview


Description:

Preview the results of a stop limit GTD order buy request before sending.


Read more on the official documentation: Preview Order

coinbase.rest.orders.preview_stop_limit_order_gtd_sell(self, product_id: str, base_size: str, limit_price: str, stop_price: str, end_time: str, stop_direction: str, commission_rate: str | None = None, is_max: bool | None = False, tradable_balance: str | None = None, skip_fcm_risk_check: bool | None = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Preview Stop-Limit Order GTD Sell

[POST] https://api.coinbase.com/api/v3/brokerage/orders/preview


Description:

Preview the results of a stop limit GTD order sell request before sending.


Read more on the official documentation: Preview Order

coinbase.rest.orders.preview_trigger_bracket_order_gtc(self, product_id: str, side: str, base_size: str, limit_price: str, stop_trigger_price: str, commission_rate: str | None = None, is_max: bool | None = False, tradable_balance: str | None = None, skip_fcm_risk_check: bool | None = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Preview Trigger Bracket Order GTC

[POST] https://api.coinbase.com/api/v3/brokerage/orders/preview


Description:

Preview the results of a trigger bracket GTC order request before sending.


Read more on the official documentation: Preview Order

coinbase.rest.orders.preview_trigger_bracket_order_gtc_buy(self, product_id: str, base_size: str, limit_price: str, stop_trigger_price: str, commission_rate: str | None = None, is_max: bool | None = False, tradable_balance: str | None = None, skip_fcm_risk_check: bool | None = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Preview Trigger Bracket Order GTC Buy

[POST] https://api.coinbase.com/api/v3/brokerage/orders/preview


Description:

Preview the results of a trigger bracket GTC order buy request before sending.


Read more on the official documentation: Preview Order

coinbase.rest.orders.preview_trigger_bracket_order_gtc_sell(self, product_id: str, base_size: str, limit_price: str, stop_trigger_price: str, commission_rate: str | None = None, is_max: bool | None = False, tradable_balance: str | None = None, skip_fcm_risk_check: bool | None = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Preview Trigger Bracket Order GTC Sell

[POST] https://api.coinbase.com/api/v3/brokerage/orders/preview


Description:

Preview the results of a trigger bracket GTC order sell request before sending.


Read more on the official documentation: Preview Order

coinbase.rest.orders.preview_trigger_bracket_order_gtd(self, product_id: str, side: str, base_size: str, limit_price: str, stop_trigger_price: str, end_time: str, commission_rate: str | None = None, is_max: bool | None = False, tradable_balance: str | None = None, skip_fcm_risk_check: bool | None = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Preview Trigger Bracket Order GTD

[POST] https://api.coinbase.com/api/v3/brokerage/orders/preview


Description:

Preview the results of a trigger bracket GTD order request before sending.


Read more on the official documentation: Preview Order

coinbase.rest.orders.preview_trigger_bracket_order_gtd_buy(self, product_id: str, base_size: str, limit_price: str, stop_trigger_price: str, end_time: str, commission_rate: str | None = None, is_max: bool | None = False, tradable_balance: str | None = None, skip_fcm_risk_check: bool | None = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Preview Trigger Bracket Order GTD Buy

[POST] https://api.coinbase.com/api/v3/brokerage/orders/preview


Description:

Preview the results of a trigger bracket GTD order buy request before sending.


Read more on the official documentation: Preview Order

coinbase.rest.orders.preview_trigger_bracket_order_gtd_sell(self, product_id: str, base_size: str, limit_price: str, stop_trigger_price: str, end_time: str, commission_rate: str | None = None, is_max: bool | None = False, tradable_balance: str | None = None, skip_fcm_risk_check: bool | None = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) Dict[str, Any][source]

Preview Trigger Bracket Order GTD Sell

[POST] https://api.coinbase.com/api/v3/brokerage/orders/preview


Description:

Preview the results of a trigger bracket GTD order sell request before sending.


Read more on the official documentation: Preview Order

Portfolios

coinbase.rest.portfolios.get_portfolios(self, portfolio_type: str | None = None, **kwargs) Dict[str, Any][source]

List Portfolios

[GET] https://api.coinbase.com/api/v3/brokerage/portfolios


Description:

Get a list of all portfolios of a user.


Read more on the official documentation: List Portfolios

coinbase.rest.portfolios.create_portfolio(self, name: str, **kwargs) Dict[str, Any][source]

Create Portfolio

[POST] https://api.coinbase.com/api/v3/brokerage/portfolios


Description:

Create a portfolio.


Read more on the official documentation: Create Portfolio

coinbase.rest.portfolios.get_portfolio_breakdown(self, portfolio_uuid: str, **kwargs) Dict[str, Any][source]

Get Portfolio Breakdown

[GET] https://api.coinbase.com/api/v3/brokerage/portfolios/{portfolio_uuid}


Description:

Get the breakdown of a portfolio by portfolio ID.


Read more on the official documentation: Get Portfolio Breakdown

coinbase.rest.portfolios.move_portfolio_funds(self, value: str, currency: str, source_portfolio_uuid: str, target_portfolio_uuid: str, **kwargs) Dict[str, Any][source]

Move Portfolio Funds

[POST] https://api.coinbase.com/api/v3/brokerage/portfolios/move_funds


Description:

Transfer funds between portfolios.


Read more on the official documentation: Move Portfolio Funds

coinbase.rest.portfolios.edit_portfolio(self, portfolio_uuid: str, name: str, **kwargs) Dict[str, Any][source]

Edit Portfolio

[PUT] https://api.coinbase.com/api/v3/brokerage/portfolios/{portfolio_uuid}


Description:

Modify a portfolio by portfolio ID.


Read more on the official documentation: Edit Portfolio

coinbase.rest.portfolios.delete_portfolio(self, portfolio_uuid: str, **kwargs) Dict[str, Any][source]

Delete Portfolio

[DELETE] https://api.coinbase.com/api/v3/brokerage/portfolios/{portfolio_uuid}


Description:

Delete a portfolio by portfolio ID.


Read more on the official documentation: Delete Portfolio

Futures

coinbase.rest.futures.close_position(self, client_order_id: str, product_id: str, size: str | None = None, **kwargs) Dict[str, Any][source]

Close Position

[POST] https://api.coinbase.com/api/v3/brokerage/orders/close_position


Description:

Places an order to close any open positions for a specified product_id.


Read more on the official documentation: Close Position

coinbase.rest.futures.get_futures_balance_summary(self, **kwargs) Dict[str, Any][source]

Get Futures Balance Summary

[GET] https://api.coinbase.com/api/v3/brokerage/cfm/balance_summary


Description:

Get information on your balances related to Coinbase Financial Markets (CFM) futures trading.


Read more on the official documentation: Get Futures Balance Summary

coinbase.rest.futures.list_futures_positions(self, **kwargs) Dict[str, Any][source]

List Futures Positions

[GET] https://api.coinbase.com/api/v3/brokerage/cfm/positions


Description:

Get a list of all open positions in CFM futures products.


Read more on the official documentation: List Futures Positions

coinbase.rest.futures.get_futures_position(self, product_id: str, **kwargs) Dict[str, Any][source]

Get Futures Position

[GET] https://api.coinbase.com/api/v3/brokerage/cfm/positions/{product_id}


Description:

Get the position of a specific CFM futures product.


Read more on the official documentation: Get Futures Position

coinbase.rest.futures.schedule_futures_sweep(self, usd_amount: str, **kwargs) Dict[str, Any][source]

Schedule Futures Sweep

[POST] https://api.coinbase.com/api/v3/brokerage/cfm/sweeps/schedule


Description:

Schedule a sweep of funds from your CFTC-regulated futures account to your Coinbase Inc. USD Spot wallet.


Read more on the official documentation: Schedule Futures Sweep

coinbase.rest.futures.list_futures_sweeps(self, **kwargs) Dict[str, Any][source]

List Futures Sweeps

[GET] https://api.coinbase.com/api/v3/brokerage/cfm/sweeps


Description:

Get information on your pending and/or processing requests to sweep funds from your CFTC-regulated futures account to your Coinbase Inc. USD Spot wallet.


Read more on the official documentation: List Futures Sweeps

coinbase.rest.futures.cancel_pending_futures_sweep(self, **kwargs) Dict[str, Any][source]

Cancel Pending Futures Sweep

[DELETE] https://api.coinbase.com/api/v3/brokerage/cfm/sweeps


Description:

Cancel your pending sweep of funds from your CFTC-regulated futures account to your Coinbase Inc. USD Spot wallet.


Read more on the official documentation: Cancel Pending Futures Sweep

Perpetuals

coinbase.rest.perpetuals.allocate_portfolio(self, portfolio_uuid: str, symbol: str, amount: str, currency: str, **kwargs) Dict[str, Any][source]

Allocate Portfolio

[POST] https://api.coinbase.com/api/v3/brokerage/intx/allocate


Description:

Allocate more funds to an isolated position in your Perpetuals portfolio.


Read more on the official documentation: Allocate Portfolio

coinbase.rest.perpetuals.get_perps_portfolio_summary(self, portfolio_uuid: str, **kwargs) Dict[str, Any][source]

Get Perpetuals Portfolio Summary

[GET] https://api.coinbase.com/api/v3/brokerage/intx/portfolio/{portfolio_uuid}


Description:

Get a summary of your Perpetuals portfolio.


Read more on the official documentation: Get Perpetuals Portfolio Summary

coinbase.rest.perpetuals.list_perps_positions(self, portfolio_uuid: str, **kwargs) Dict[str, Any][source]

List Perpetuals Positions

[GET] https://api.coinbase.com/api/v3/brokerage/intx/positions/{portfolio_uuid}


Description:

Get a list of open positions in your Perpetuals portfolio.


Read more on the official documentation: List Perpetuals Positions

coinbase.rest.perpetuals.get_perps_position(self, portfolio_uuid: str, symbol: str, **kwargs) Dict[str, Any][source]

Get Perpetuals Position

[GET] https://api.coinbase.com/api/v3/brokerage/intx/positions/{portfolio_uuid}/{symbol}


Description:

Get a specific open position in your Perpetuals portfolio


Read more on the official documentation: Get Perpetuals Positions

Fees

coinbase.rest.fees.get_transaction_summary(self, product_type: str | None = None, contract_expiry_type: str | None = None, **kwargs) Dict[str, Any][source]

Get Transactions Summary

[GET] https://api.coinbase.com/api/v3/brokerage/transaction_summary


Description:

Get a summary of transactions with fee tiers, total volume, and fees.


Read more on the official documentation: Create Convert Quote

Converts

coinbase.rest.convert.create_convert_quote(self, from_account: str, to_account: str, amount: str, user_incentive_id: str | None = None, code_val: str | None = None, **kwargs) Dict[str, Any][source]

Create Convert Quote

[POST] https://api.coinbase.com/api/v3/brokerage/convert/quote


Description:

Create a convert quote with a specified source currency, target currency, and amount.


Read more on the official documentation: Create Convert Quote

coinbase.rest.convert.get_convert_trade(self, trade_id: str, from_account: str, to_account: str, **kwargs) Dict[str, Any][source]

Get Convert Trade

[GET] https://api.coinbase.com/api/v3/brokerage/convert/trade/{trade_id}


Description:

Gets a list of information about a convert trade with a specified trade ID, source currency, and target currency.


Read more on the official documentation: Get Convert Trade

coinbase.rest.convert.commit_convert_trade(self, trade_id: str, from_account: str, to_account: str, **kwargs) Dict[str, Any][source]

Commit Convert Trade

[POST] https://api.coinbase.com/api/v3/brokerage/convert/trade/{trade_id}


Description:

Commits a convert trade with a specified trade ID, source currency, and target currency.


Read more on the official documentation: Commit Convert Trade

Public

coinbase.rest.public.get_unix_time(self, **kwargs) Dict[str, Any][source]

Get Server Time

[GET] https://api.coinbase.com/api/v3/brokerage/time


Description:

Get the current time from the Coinbase Advanced API. This is a public endpoint.


Read more on the official documentation: Get Server Time

coinbase.rest.public.get_public_product_book(self, product_id: str, limit: int | None = None, **kwargs) Dict[str, Any][source]

Get Public Product Book

[GET] https://api.coinbase.com/api/v3/brokerage/market/product_book


Description:

Get a list of bids/asks for a single product. The amount of detail shown can be customized with the limit parameter.


API Key Permissions:

This endpoint is public and does not need authentication.


Read more on the official documentation: Get Public Product Book

coinbase.rest.public.get_public_products(self, limit: int | None = None, offset: int | None = None, product_type: str | None = None, product_ids: List[str] | None = None, contract_expiry_type: str | None = None, expiring_contract_status: str | None = None, **kwargs) Dict[str, Any][source]

List Public Products

[GET] https://api.coinbase.com/api/v3/brokerage/market/products


Description:

Get a list of the available currency pairs for trading.


API Key Permissions:

This endpoint is public and does not need authentication.


Read more on the official documentation: List Public Products

coinbase.rest.public.get_public_product(self, product_id: str, **kwargs) Dict[str, Any][source]

Public Get Product

[GET] https://api.coinbase.com/api/v3/brokerage/market/products/{product_id}


Description:

Get information on a single product by product ID.


API Key Permissions:

This endpoint is public and does not need authentication.


Read more on the official documentation: Get Public Product

coinbase.rest.public.get_public_candles(self, product_id: str, start: str, end: str, granularity: str, **kwargs) Dict[str, Any][source]

Get Public Product Candles

[GET] https://api.coinbase.com/api/v3/brokerage/market/products/{product_id}/candles


Description:

Get rates for a single product by product ID, grouped in buckets.


API Key Permissions:

This endpoint is public and does not need authentication.


Read more on the official documentation: Get Public Product Candles

coinbase.rest.public.get_public_market_trades(self, product_id: str, limit: int, start: str | None = None, end: str | None = None, **kwargs) Dict[str, Any][source]

Get Public Market Trades

[GET] https://api.coinbase.com/api/v3/brokerage/market/products/{product_id}/ticker


Description:

Get snapshot information, by product ID, about the last trades (ticks), best bid/ask, and 24h volume.


API Key Permissions:

This endpoint is public and does not need authentication.


Read more on the official documentation: Get Public Market Trades

Payments

coinbase.rest.payments.list_payment_methods(self, **kwargs) Dict[str, Any][source]

List Payment Methods

[GET] https://api.coinbase.com/api/v3/brokerage/payment_methods


Description:

Get a list of payment methods for the current user.


Read more on the official documentation: List Payment Methods

coinbase.rest.payments.get_payment_method(self, payment_method_id: str, **kwargs) Dict[str, Any][source]

Get Payment Method

[GET] https://api.coinbase.com/api/v3/brokerage/payment_methods/{payment_method_id}


Description:

Get information about a payment method for the current user.


Read more on the official documentation: Get Payment Method