# REST API Client

## RESTClient Constructor

class coinbase.rest.RESTClient(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, rate_limit_headers: bool | None = False)

  ### 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

  - rate_limit_headers | Optional (bool) - Enables rate limit headers. Default set to False

## REST Utils

coinbase.rest.RESTClient.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.RESTClient.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.RESTClient.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.RESTClient.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.RESTClient.get_accounts(self, limit: int | None = None, cursor: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → ListAccountsResponse

  ### 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.RESTClient.get_account(self, account_uuid: str, **kwargs) → GetAccountResponse

  ### 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.RESTClient.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, get_tradability_status: bool | None = False, get_all_products: bool | None = False, **kwargs) → ListProductsResponse

  ### 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.RESTClient.get_product(self, product_id: str, get_tradability_status: bool | None = False, **kwargs) → GetProductResponse

  ### 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.RESTClient.get_product_book(self, product_id: str, limit: int | None = None, aggregation_price_increment: str | None = None, **kwargs) → GetProductBookResponse

  ### 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.RESTClient.get_best_bid_ask(self, product_ids: List[str] | None = None, **kwargs) → GetBestBidAskResponse

  ### 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.RESTClient.get_candles(self, product_id: str, start: str, end: str, granularity: str, limit: int | None = None, **kwargs) → GetProductCandlesResponse

  ### 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.RESTClient.get_market_trades(self, product_id: str, limit: int, start: str | None = None, end: str | None = None, **kwargs) → GetMarketTradesResponse

  ### 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.RESTClient.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) → CreateOrderResponse

  ### 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.RESTClient.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) → CreateOrderResponse

  ### 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.RESTClient.market_order_buy(self, client_order_id: str, product_id: 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) → CreateOrderResponse

  ### 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.RESTClient.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) → CreateOrderResponse

  ### 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.RESTClient.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) → CreateOrderResponse

  ### 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.RESTClient.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) → CreateOrderResponse

  ### 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.RESTClient.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) → CreateOrderResponse

  ### 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.RESTClient.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) → CreateOrderResponse

  ### 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.RESTClient.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) → CreateOrderResponse

  ### 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.RESTClient.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) → CreateOrderResponse

  ### 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.RESTClient.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) → CreateOrderResponse

  ### 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.RESTClient.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) → CreateOrderResponse

  ### 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.RESTClient.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) → CreateOrderResponse

  ### 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.RESTClient.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) → CreateOrderResponse

  ### 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.RESTClient.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) → CreateOrderResponse

  ### 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.RESTClient.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) → CreateOrderResponse

  ### 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.RESTClient.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) → CreateOrderResponse

  ### 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.RESTClient.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) → CreateOrderResponse

  ### 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.RESTClient.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) → CreateOrderResponse

  ### 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.RESTClient.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) → CreateOrderResponse

  ### 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.RESTClient.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) → CreateOrderResponse

  ### 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.RESTClient.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) → CreateOrderResponse

  ### 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.RESTClient.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) → CreateOrderResponse

  ### 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.RESTClient.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) → CreateOrderResponse

  ### 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.RESTClient.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) → CreateOrderResponse

  ### 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.RESTClient.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) → CreateOrderResponse

  ### 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.RESTClient.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) → CreateOrderResponse

  ### 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.RESTClient.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) → CreateOrderResponse

  ### 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.RESTClient.get_order(self, order_id: str, **kwargs) → GetOrderResponse

  ### 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.RESTClient.list_orders(self, order_ids: List[str] | None = None, product_ids: List[str] | None = None, order_status: List[str] | None = None, limit: int | None = None, start_date: str | None = None, end_date: str | None = None, order_types: 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, time_in_forces: str | None = None, sort_by: str | None = None, **kwargs) → ListOrdersResponse

  ### 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.RESTClient.get_fills(self, order_ids: List[str] | None = None, trade_ids: List[str] | None = None, product_ids: List[str] | None = None, start_sequence_timestamp: str | None = None, end_sequence_timestamp: str | None = None, retail_portfolio_id: str | None = None, limit: int | None = None, cursor: str | None = None, sort_by: str | None = None, **kwargs) → ListFillsResponse

  ### 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.RESTClient.edit_order(self, order_id: str, size: str | None = None, price: str | None = None, **kwargs) → EditOrderResponse

  ### 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.RESTClient.preview_edit_order(self, order_id: str, size: str | None = None, price: str | None = None, **kwargs) → EditOrderPreviewResponse

  ### 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.RESTClient.cancel_orders(self, order_ids: List[str], **kwargs) → CancelOrdersResponse

  ### 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.RESTClient.preview_order(self, product_id: str, side: str, order_configuration, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → PreviewOrderResponse

  ### 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.RESTClient.preview_market_order(self, product_id: str, side: str, quote_size: str | None = None, base_size: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → PreviewOrderResponse

  ### 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.RESTClient.preview_market_order_buy(self, product_id: str, quote_size: str | None = None, base_size: str | None = None, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → PreviewOrderResponse

  ### 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.RESTClient.preview_market_order_sell(self, product_id: str, base_size: str, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → PreviewOrderResponse

  ### 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.RESTClient.preview_limit_order_ioc(self, product_id: str, side: str, base_size: str, limit_price: str, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → PreviewOrderResponse

  ### 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.RESTClient.preview_limit_order_ioc_buy(self, product_id: str, base_size: str, limit_price: str, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → PreviewOrderResponse

  ### 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.RESTClient.preview_limit_order_ioc_sell(self, product_id: str, base_size: str, limit_price: str, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → PreviewOrderResponse

  ### 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.RESTClient.preview_limit_order_gtc(self, product_id: str, side: str, base_size: str, limit_price: str, post_only: bool = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → PreviewOrderResponse

  ### 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.RESTClient.preview_limit_order_gtc_buy(self, product_id: str, base_size: str, limit_price: str, post_only: bool = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → PreviewOrderResponse

  ### 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.RESTClient.preview_limit_order_gtc_sell(self, product_id: str, base_size: str, limit_price: str, post_only: bool = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → PreviewOrderResponse

  ### 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.RESTClient.preview_limit_order_gtd(self, product_id: str, side: str, base_size: str, limit_price: str, end_time: str, post_only: bool = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → PreviewOrderResponse

  ### 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.RESTClient.preview_limit_order_gtd_buy(self, product_id: str, base_size: str, limit_price: str, end_time: str, post_only: bool = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → PreviewOrderResponse

  ### 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.RESTClient.preview_limit_order_gtd_sell(self, product_id: str, base_size: str, limit_price: str, end_time: str, post_only: bool = False, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → PreviewOrderResponse

  ### 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.RESTClient.preview_limit_order_fok(self, product_id: str, side: str, base_size: str, limit_price: str, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → PreviewOrderResponse

  ### 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.RESTClient.preview_limit_order_fok_buy(self, product_id: str, base_size: str, limit_price: str, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → PreviewOrderResponse

  ### 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.RESTClient.preview_limit_order_fok_sell(self, product_id: str, base_size: str, limit_price: str, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → PreviewOrderResponse

  ### 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.RESTClient.preview_stop_limit_order_gtc(self, product_id: str, side: str, base_size: str, limit_price: str, stop_price: str, stop_direction: str, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → PreviewOrderResponse

  ### 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.RESTClient.preview_stop_limit_order_gtc_buy(self, product_id: str, base_size: str, limit_price: str, stop_price: str, stop_direction: str, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → PreviewOrderResponse

  ### 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.RESTClient.preview_stop_limit_order_gtc_sell(self, product_id: str, base_size: str, limit_price: str, stop_price: str, stop_direction: str, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → PreviewOrderResponse

  ### 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.RESTClient.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, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → PreviewOrderResponse

  ### 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.RESTClient.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, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → PreviewOrderResponse

  ### 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.RESTClient.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, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → PreviewOrderResponse

  ### 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.RESTClient.preview_trigger_bracket_order_gtc(self, product_id: str, side: str, base_size: str, limit_price: str, stop_trigger_price: str, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → PreviewOrderResponse

  ### 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.RESTClient.preview_trigger_bracket_order_gtc_buy(self, product_id: str, base_size: str, limit_price: str, stop_trigger_price: str, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → PreviewOrderResponse

  ### 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.RESTClient.preview_trigger_bracket_order_gtc_sell(self, product_id: str, base_size: str, limit_price: str, stop_trigger_price: str, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → PreviewOrderResponse

  ### 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.RESTClient.preview_trigger_bracket_order_gtd(self, product_id: str, side: str, base_size: str, limit_price: str, stop_trigger_price: str, end_time: str, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → PreviewOrderResponse

  ### 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.RESTClient.preview_trigger_bracket_order_gtd_buy(self, product_id: str, base_size: str, limit_price: str, stop_trigger_price: str, end_time: str, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → PreviewOrderResponse

  ### 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.RESTClient.preview_trigger_bracket_order_gtd_sell(self, product_id: str, base_size: str, limit_price: str, stop_trigger_price: str, end_time: str, leverage: str | None = None, margin_type: str | None = None, retail_portfolio_id: str | None = None, **kwargs) → PreviewOrderResponse

  ### 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

coinbase.rest.RESTClient.close_position(self, client_order_id: str, product_id: str, size: str | None = None, **kwargs) → ClosePositionResponse

  ### 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

## Portfolios

coinbase.rest.RESTClient.get_portfolios(self, portfolio_type: str | None = None, **kwargs) → ListPortfoliosResponse

  ### 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.RESTClient.create_portfolio(self, name: str, **kwargs) → CreatePortfolioResponse

  ### 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.RESTClient.get_portfolio_breakdown(self, portfolio_uuid: str, currency: str | None = None, **kwargs) → GetPortfolioBreakdownResponse

  ### 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.RESTClient.move_portfolio_funds(self, value: str, currency: str, source_portfolio_uuid: str, target_portfolio_uuid: str, **kwargs) → MovePortfolioFundsResponse

  ### 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.RESTClient.edit_portfolio(self, portfolio_uuid: str, name: str, **kwargs) → EditPortfolioResponse

  ### 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.RESTClient.delete_portfolio(self, portfolio_uuid: str, **kwargs) → DeletePortfolioResponse

  ### 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.RESTClient.get_futures_balance_summary(self, **kwargs) → GetFuturesBalanceSummaryResponse

  ### 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.RESTClient.list_futures_positions(self, **kwargs) → ListFuturesPositionsResponse

  ### 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.RESTClient.get_futures_position(self, product_id: str, **kwargs) → GetFuturesPositionResponse

  ### 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.RESTClient.schedule_futures_sweep(self, usd_amount: str, **kwargs) → ScheduleFuturesSweepResponse

  ### 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.RESTClient.list_futures_sweeps(self, **kwargs) → ListFuturesSweepsResponse

  ### 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.RESTClient.cancel_pending_futures_sweep(self, **kwargs) → CancelPendingFuturesSweepResponse

  ### 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

coinbase.rest.RESTClient.get_intraday_margin_setting(self, **kwargs) → GetIntradayMarginSettingResponse

  ### Get Intraday Margin Setting

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

  Description:

  Get the status of whether your account is opted in to receive increased leverage on futures trades on weekdays from 8am-4pm ET.

  Read more on the official documentation: Get Intraday Margin Setting

coinbase.rest.RESTClient.get_current_margin_window(self, margin_profile_type: str, **kwargs) → GetCurrentMarginWindowResponse

  ### Get Current Margin Window

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

  Description:

  Get the current margin window to determine whether intraday or overnight margin rates are in effect.

  Read more on the official documentation: Get Current Margin Window

coinbase.rest.RESTClient.set_intraday_margin_setting(self, setting: str, **kwargs) → SetIntradayMarginSettingResponse

  ### Set Intraday Margin Setting

  [POST] https://api.coinbase.com/api/v3/brokerage/cfm/intraday/margin_setting

  Description:

  Opt in to receive increased leverage on futures trades on weekdays from 8am-4pm ET.

  Read more on the official documentation: Set Intraday Margin Setting

## Perpetuals

coinbase.rest.RESTClient.allocate_portfolio(self, portfolio_uuid: str, symbol: str, amount: str, currency: str, **kwargs) → AllocatePortfolioResponse

  ### 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.RESTClient.get_perps_portfolio_summary(self, portfolio_uuid: str, **kwargs) → GetPerpetualsPortfolioSummaryResponse

  ### 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.RESTClient.list_perps_positions(self, portfolio_uuid: str, **kwargs) → ListPerpetualsPositionsResponse

  ### 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.RESTClient.get_perps_position(self, portfolio_uuid: str, symbol: str, **kwargs) → GetPerpetualsPositionResponse

  ### 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

coinbase.rest.RESTClient.get_perps_portfolio_balances(self, portfolio_uuid: str, **kwargs) → GetPortfolioBalancesResponse

  ### Get Portfolio Balances

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

  Description:

  Get a list of asset balances on Intx for a given Portfolio

  Read more on the official documentation: Get Portfolio Balances

coinbase.rest.RESTClient.opt_in_or_out_multi_asset_collateral(self, portfolio_uuid: str, multi_asset_collateral_enabled: bool, **kwargs) → OptInOutMultiAssetCollateralResponse

  ### Opt In or Out of Multi Asset Collateral

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

  Description:

  Enable or Disable Multi Asset Collateral for a given Portfolio.

  Read more on the official documentation: Opt In or Out of Multi Asset Collateral

## Fees

coinbase.rest.RESTClient.get_transaction_summary(self, product_type: str | None = None, contract_expiry_type: str | None = None, product_venue: str | None = None, **kwargs) → GetTransactionSummaryResponse

  ### 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: Get Transaction Summary

## Converts

coinbase.rest.RESTClient.create_convert_quote(self, from_account: str, to_account: str, amount: str, user_incentive_id: str | None = None, code_val: str | None = None, **kwargs) → CreateConvertQuoteResponse

  ### 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.RESTClient.get_convert_trade(self, trade_id: str, from_account: str, to_account: str, **kwargs) → GetConvertTradeResponse

  ### 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.RESTClient.commit_convert_trade(self, trade_id: str, from_account: str, to_account: str, **kwargs) → CommitConvertTradeResponse

  ### 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.RESTClient.get_unix_time(self, **kwargs) → GetServerTimeResponse

  ### 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.RESTClient.get_public_product_book(self, product_id: str, limit: int | None = None, aggregation_price_increment: str | None = None, **kwargs) → GetProductBookResponse

  ### 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.RESTClient.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, get_all_products: bool = False, **kwargs) → ListProductsResponse

  ### 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.RESTClient.get_public_product(self, product_id: str, **kwargs) → GetProductResponse

  ### 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.RESTClient.get_public_candles(self, product_id: str, start: str, end: str, granularity: str, limit: int | None = None, **kwargs) → GetProductCandlesResponse

  ### 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.RESTClient.get_public_market_trades(self, product_id: str, limit: int, start: str | None = None, end: str | None = None, **kwargs) → GetMarketTradesResponse

  ### 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.RESTClient.list_payment_methods(self, **kwargs) → ListPaymentMethodsResponse

  ### 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.RESTClient.get_payment_method(self, payment_method_id: str, **kwargs) → GetPaymentMethodResponse

  ### 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

## Data API

coinbase.rest.RESTClient.get_api_key_permissions(self, **kwargs) → GetAPIKeyPermissionsResponse

  ### Get Api Key Permissions

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

  Description:

  Get information about your CDP API key permissions

  Read more on the official documentation: Create Convert Quote