# 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="https://1098802886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvYPfj17W02xNuqsGca3P%2Fuploads%2FeNBGBeevgcIJ1SMmKRyk%2Fimage.png?alt=media&#x26;token=3892e5ce-573b-4c56-ab23-ae195eb9a9ee" 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="https://1098802886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvYPfj17W02xNuqsGca3P%2Fuploads%2FE2PtLUWYCJ5ArcshnpAJ%2Fimage.png?alt=media&#x26;token=9ea94614-7915-45e6-b260-a9f2a3620e1c" 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="https://1098802886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvYPfj17W02xNuqsGca3P%2Fuploads%2FCA9QtjD84ftVUMCLYgzX%2Fimage.png?alt=media&#x26;token=e773e7b6-8262-4035-987d-643ad56f40e3" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1098802886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvYPfj17W02xNuqsGca3P%2Fuploads%2FfJKUgzqkS76EHIvXDvPp%2Fimage.png?alt=media&#x26;token=8e2ff019-a2a8-46c9-b68b-dbad60a918ec" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://1098802886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvYPfj17W02xNuqsGca3P%2Fuploads%2FymAHTezMcnSJiXbv0iQy%2Fimage.png?alt=media&#x26;token=31bcc718-f04e-48b0-8bc8-05144439a1e9" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://1098802886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvYPfj17W02xNuqsGca3P%2Fuploads%2F364pXQdYJD9mDd2Ogn9Z%2Fimage.png?alt=media&#x26;token=05ba46b5-a79d-46e6-8fe2-c0d81cf4d97e" alt=""><figcaption></figcaption></figure>

* Put your phone number to verify your phone.

<figure><img src="https://1098802886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvYPfj17W02xNuqsGca3P%2Fuploads%2FoOP0sOaV3xBAPLLbGnU5%2Fimage.png?alt=media&#x26;token=9859b21f-791a-4d3f-be33-f76eff91281d" alt=""><figcaption></figcaption></figure>

* Enter a secure password

<figure><img src="https://1098802886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvYPfj17W02xNuqsGca3P%2Fuploads%2Fmbou952Uk1PVC8nPFDAE%2Fimage.png?alt=media&#x26;token=c1807285-51a4-450d-a1b6-e75a894f176d" 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="https://1098802886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvYPfj17W02xNuqsGca3P%2Fuploads%2FvqsZZKxw7bY1SfRnVarQ%2Fimage.png?alt=media&#x26;token=142f2f30-e116-45f9-bd61-865d4ac30398" 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="https://1098802886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvYPfj17W02xNuqsGca3P%2Fuploads%2FJ5eAZ4ij3ENOvY96VmoW%2Fimage.png?alt=media&#x26;token=0e903e54-ff99-4ee5-9a04-1cd718012aeb" 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="https://1098802886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvYPfj17W02xNuqsGca3P%2Fuploads%2FkeDiljieuX8zKbKabndD%2Fimage.png?alt=media&#x26;token=103a814f-5238-4005-9717-69afffb5bcab" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://1098802886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvYPfj17W02xNuqsGca3P%2Fuploads%2Ft1VaFeJ00QqqrLDlMRFW%2Fimage.png?alt=media&#x26;token=b2e80a40-4531-45f8-b66e-52f36a0338d3" 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="https://1098802886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvYPfj17W02xNuqsGca3P%2Fuploads%2F9HiGcK7YZ7RCW9coFoq5%2Fimage.png?alt=media&#x26;token=a7e3afa6-7ae2-4aca-8bfb-ef890e38513d" 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="https://1098802886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvYPfj17W02xNuqsGca3P%2Fuploads%2FnK1pz71QzPJaQXc3uQTV%2Fimage.png?alt=media&#x26;token=ff7071e2-e05f-4626-ae49-fe4dce02dd40" alt=""><figcaption></figcaption></figure>

**Step 2: Create API Key**

* Click "**Create APIs**"

<figure><img src="https://1098802886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvYPfj17W02xNuqsGca3P%2Fuploads%2Fiv1wrtqDzTN4NF5P9EZk%2Fimage.png?alt=media&#x26;token=0230c0d4-cebd-42ea-9b97-c3e503ead6b8" 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="https://1098802886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvYPfj17W02xNuqsGca3P%2Fuploads%2FJfgIK3cGrFau0fN8rBpw%2Fimage.png?alt=media&#x26;token=80c5bc3c-0b0a-49d1-8b69-0320b211d42e" alt=""><figcaption></figcaption></figure>

**Step 4: Final Security Confirmation**

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

<figure><img src="https://1098802886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvYPfj17W02xNuqsGca3P%2Fuploads%2FIcbioIjeMRUXHBO2ho9m%2Fimage.png?alt=media&#x26;token=a94552c9-72f4-42b4-8918-91f8720012c7" 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="https://1098802886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvYPfj17W02xNuqsGca3P%2Fuploads%2FNwZQ0H0vNGJB7xCPKJ4h%2Fimage.png?alt=media&#x26;token=7ca62090-5b20-4284-9361-f0cc6f032eb7" 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="https://1098802886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvYPfj17W02xNuqsGca3P%2Fuploads%2FZHMt2QXPUsHngwQw4eGA%2Fimage.png?alt=media&#x26;token=39103bf5-c7fb-46a2-a5de-419facf58d96" 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="https://1098802886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvYPfj17W02xNuqsGca3P%2Fuploads%2FZHhm0Y3ji0dlxDgWC7eG%2Fimage.png?alt=media&#x26;token=05d11aae-a242-4b56-b17b-d17aa66b8969" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://1098802886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvYPfj17W02xNuqsGca3P%2Fuploads%2FCNVhBgobOCA2JOlg0xKD%2Fimage.png?alt=media&#x26;token=19e6d4d8-8b9f-4e9b-81ea-7df0e394d125" 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="https://1098802886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvYPfj17W02xNuqsGca3P%2Fuploads%2FkOOc0G3cO8e1R9MkriCa%2Fimage.png?alt=media&#x26;token=a21f8f27-cf00-42aa-b7fe-33f3d7f71103" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://1098802886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvYPfj17W02xNuqsGca3P%2Fuploads%2FYNdNObjiqAGrK5MTcW7H%2Fimage.png?alt=media&#x26;token=2ff3b9c5-885a-429d-ad25-4e2e5790a927" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://1098802886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvYPfj17W02xNuqsGca3P%2Fuploads%2F0KbQPwoaliJUQUTiDRio%2FScreenshot%202024-08-29%20at%2011.03.38.png?alt=media&#x26;token=b8e3b2e5-de6e-4792-8bab-3242a361c63c" alt=""><figcaption></figcaption></figure>
