# Creating a Coinbase API Key

{% embed url="<https://youtu.be/akDRnQeOmMs?si=nWvca5YAu_gOjlh5&t=411>" %}

Also see [Coinbase's docs on creating Advanced Trade API Keys](https://docs.cdp.coinbase.com/advanced-trade/docs/getting-started/). Log in to your Coinbase account, navigate to the API section by clicking on the "API" option in the sidebar on the left and access the [API Key Management Page](https://www.coinbase.com/settings/api).<br>

<figure><img src="https://1855557010-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuzWZkA5631kraBpRETyN%2Fuploads%2F4IiqsDkYbtHKCvlovadO%2Fscreenshot%202024-08-23%20um%2015.43.01.png?alt=media&#x26;token=27f4b5aa-49a2-497c-ab8e-b06e7c942ad7" alt=""><figcaption></figcaption></figure>

On the API Key management page, click the "Create API key" button. A window will pop up for you to configure the API key. Choose a name for your API key.&#x20;

<figure><img src="https://1855557010-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuzWZkA5631kraBpRETyN%2Fuploads%2F39TxhzdWEAvtYCrrdrEz%2Fscreenshot%202024-08-23%20um%2015.48.19.png?alt=media&#x26;token=e4be2774-846e-47bb-8876-79248e35c1e2" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
To trade both Spot and Perpetual (Perps) contracts, you need two separate keys, each associated with their respective portfolio.
{% endhint %}

Under Portfoilio, select "Default" to create a API key for trading your spot Portfolio. Select "Perpetuals" to create an API key to trade your Perpetuals Portfolio. If you want to trade both, you will need to create both keys and enter them both in the Terminal. You can also select any user created portfolio of choice and assign API key to that portfolio.<br>

Please ensure to enable the following permissions:

* View: Allows read-only access to your portfolio.
* Trade: Enables trade execution on your behalf.

Once you’ve configured the settings, click **"Create & download"** and follow the 2FA instructions to generate the API key.

<figure><img src="https://1855557010-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuzWZkA5631kraBpRETyN%2Fuploads%2FGgQzwOsnp1kBz3kadumn%2Fscreenshot%202024-08-23%20um%2016.10.27.png?alt=media&#x26;token=4011a2f5-ca26-4fa3-874c-19b83e04605b" alt="" width="446"><figcaption></figcaption></figure>

#### [Now you can add the API key to the Terminal.](https://docs.insilicoterminal.com/documentation/setup/adding-your-api-key-to-the-terminal)

{% hint style="info" %}
Existing Legacy API Keys are still supported, but creation of new legacy key has been disabled in the Coinbase app. If you have one, just toggle the checkbox when adding the key in the Terminal.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.insilicoterminal.com/documentation/setup/creating-an-api-key/creating-a-coinbase-api-key.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
