# Connect OKX API

{% hint style="info" %}
Register an OKX account: <https://www.okx.com/join/75651458> (Referral code: **`75651458`**)
{% endhint %}

Click on your wallet in the top right-hand corner of the screen and go to the "Wallet Management" tab or visit <https://app.copin.io/wallet-management>

<figure><img src="/files/StlwwjXpZne75n5PYHju" alt=""><figcaption></figcaption></figure>

Click "Create" at " OKX Exchange" to start linking your OKX Exchange account to app.copin.io through API key.

<figure><img src="/files/yAxMF1XBSpohCXrF2KOx" alt=""><figcaption></figcaption></figure>

The connection process involves:

<table data-header-hidden><thead><tr><th width="258"></th><th></th></tr></thead><tbody><tr><td><strong>OKX Account Setup</strong></td><td>Create an account, unless you already have one.</td></tr><tr><td><strong>Identify Verification</strong></td><td>Identify Verification or <strong>Know Your Customer</strong> (KYC) standards are required for all users of OKX.</td></tr><tr><td><strong>API Key Creation</strong></td><td>Generate an <strong>API key</strong> for Copin Analyzer integration.</td></tr><tr><td><strong>Fund Deposit and Transfer</strong></td><td>Deposit funds into OKX and transfer them to your <strong>Unified Trading Account</strong></td></tr><tr><td><strong>Setup Trading mode</strong></td><td>Set <strong>Isolate Margin</strong> and <strong>Hedge Mode</strong> for all trading pairs</td></tr></tbody></table>

> *For any difficulties, we invite you to join* [*the Copin.io community* ](https://t.me/Copin_io)*where our admin team is ready to assist.*

## **1. OKX Account Setup**

**Step 1: Sign up for an OKX account.**

* To create a new account on OKX, you must first visit the [OKX Website](https://www.okx.com/join/75651458).
* Then click on the "Sign up" button to get started.

**Step 2: Account Registration**

* Choose your region. Agree to OKX Terms of Service, Risk & Compliance Disclosure & Privacy Policy. Confirm to continue.

<figure><img src="/files/72o7ESwoL2J9gwgFIup4" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/mmYcQKU97YEcyZ6ZusMs" alt=""><figcaption></figcaption></figure>

* Fill in your email and referral code **`75651458` (Use the referral code COPIN for initial account benefits).**

<figure><img src="/files/v7RsfeSsTKgzpwrSTUOS" alt=""><figcaption></figcaption></figure>

* OKX will send a verification email with a confirmation code. Enter the code and complete email verification.

<figure><img src="/files/JNybXqUUnJmIo2wGypHu" alt=""><figcaption></figcaption></figure>

* Put your phone number to verify your phone.

<figure><img src="/files/dGJEeqMsMoHsGeGTPJ09" alt=""><figcaption></figcaption></figure>

* Enter a secure password

<figure><img src="/files/EXBHOxO4hlmh9EaLnpty" alt=""><figcaption></figcaption></figure>

## **2. KYC Verification**

**Step 1: Access the Identity Verification Page**

* Hover over your profile in the top right corner of the screen and select "Verification"

<figure><img src="/files/4BZwZGyzWhG8Ji67HhiW" alt=""><figcaption></figcaption></figure>

* Proceed to Identity Verification to access the verification page. Alternatively, you can directly access the verification page using this link: <https://www.okx.com/account/kyc/personal/overview>

<figure><img src="/files/48uwDaB4EKmxqk99ba0d" alt=""><figcaption></figcaption></figure>

**Step 2: Complete KYC**

* Click on "Verify Now" and complete the verification process as instructed by OKX to verify your account.

<figure><img src="/files/9ZrEH1HRU7RG7FHyqRoF" alt=""><figcaption></figcaption></figure>

* Select your country of residence. Choose the document type. Then click "Next" to proceed.

<figure><img src="/files/4gi4zAvNIz5hCoC9qSlr" alt=""><figcaption></figcaption></figure>

* Please complete all the verification steps requested by OKX to finish verifying your account. Note that the verification device must have a camera to enable live image verification.

<figure><img src="/files/ha28Lu8i97Q7lDSR91Ay" alt=""><figcaption></figcaption></figure>

## **3. API Key Creation**

**Step 1: Access the API keys page**

* Hover over your profile in the top right corner of the screen and select "API" or click on the link <https://www.okx.com/account/my-api>

<figure><img src="/files/PhwNXuE2BFctFr26ljyz" alt=""><figcaption></figcaption></figure>

**Step 2: Create API Key**

* Click "**Create APIs**"

<figure><img src="/files/aRqTwXZDHomW89ewEVtD" alt=""><figcaption></figcaption></figure>

**Step 3: Modify API Info**

* Remark API name for easy identification. Choose API trading, enable Trade permission, and secure with Passphrase. Then "Submit all".

<figure><img src="/files/QMeOmJvmH05LnkqSFvZD" alt=""><figcaption></figcaption></figure>

**Step 4: Final Security Confirmation**

* Complete the process with a final security verification then "Confirm".

<figure><img src="/files/feQ2rGH9ykiVWw3pAGoc" alt=""><figcaption></figcaption></figure>

* The Access APIKey and SecretKey are displayed, so let's copy and fill in[ Copin Wallet Management](https://app.copin.io/wallet-management)

<figure><img src="/files/oSBeGm1B8Ksf5o2X7eGK" alt=""><figcaption></figcaption></figure>

**Step 5: Complete creating OKX Wallet on Copin.io**

* Access <https://app.copin.io/wallet-management>
* Fill in the API Key, Secret Key and Pass Phrase you just created in the previous step.

<figure><img src="/files/VKc2lT5kNChgVrsfmKKu" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If you encounter the <mark style="color:red;">**INVALID API KEY**</mark> error, please ensure that:&#x20;

1. Your futures account balance is greater than 0 (refer to Section 4. Fund Deposit and Transfer).&#x20;
2. You have switched to Isolated Margin and Hedge Mode (refer to Section 5. Setup Trading Mode).
   {% endhint %}

## **4. Fund Deposit and Transfer**

**Step 1: Make a deposit on OKX**

* Before you start copy trading, you'll need to make a deposit into your OKX account. You can choose between several methods for depositing money into your account: cryptocurrency deposit, credit/debit card, P2P, Third Party or bank transfer.
* Depending on the method you choose, OKX will give you the steps to follow to make your deposit.

**Step 2: Transfer funds to Trading account**

<figure><img src="/files/po5TAsMJHWIbv8Dftf0b" alt=""><figcaption></figcaption></figure>

* Make sure to transfer from "Funding" to "Trading". And input the USDT amount into "Amount" then Confirm.

<figure><img src="/files/2Ju3QGjxbWOSUhcB0j5d" alt=""><figcaption></figcaption></figure>

## **5. Setup Account mode**

These settings ensure that the copy trading system operates in the most logical manner.

* Hover over the "Trade" tab. Next, select "Futures". Then, choose any random trading pair. In this example, we'll use "BTC/USDT".

<figure><img src="/files/5BecN7cpFNrOOgv3Qqdq" alt=""><figcaption></figcaption></figure>

* Click on "Settings" in the top right corner.

<figure><img src="/files/WWPKd1MClmTwHF4PLBq1" alt=""><figcaption></figcaption></figure>

* Set account mode to "Spot and futures mod&#x65;**"**. Click on switch to finish.

<figure><img src="/files/rpQDNoYGKu6DkRClXY8j" alt=""><figcaption></figcaption></figure>


---

# 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.copin.io/features/centralized-copy-trading-ccp/connect-okx-api.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.
