# All Transactions Source: https://docs.oppiwallet.com/en/api-reference/endpoints/all-transactions GET /transactions This API is used for get all transactions with status. Status : 0=Pending, 1=Completed, 2=Failed ## Authentication A JWT token required for API authentication. Generate JWT token as explained in section Generate JWT Token using empty string. ## Headers Must be set to `application/json`. ## Request No request body is required for this endpoint. ```bash cURL theme={null} curl --request GET \ --url https://doc-api.oppiwallet.com/api/v1/transactions \ --header 'signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \ --header 'Content-Type: application/json' ``` ```javascript JavaScript theme={null} const axios = require('axios'); let config = { method: 'get', maxBodyLength: Infinity, url: 'https://doc-api.oppiwallet.com/api/v1/transactions', headers: { 'signatureToken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmkiOiJjcmVhdGVUcmFuc2FjdGlvblJlcXVlc3QiLCJpYXQiOjE3MTUxNTM2NTQsImV4cCI6MTcxNTE1MzcwOSwia2V5Ijoicmh0TmJELU9yTFQteFp3M3QtMkpFWnR4Iiwic2lnbmF0dXJlU3RyaW5nIjoiMWVjY2M1NDc0YWZiMzU4NDExNDEzNjBkOGQ0MDBlMWYxOWIzNRjYzVkM2YxNTRjNmQ5YjViNSJ9.JuF7d8Oc4EyMvm7s5g3CN9L9Wbl_TFI_yO8jt20dvHw', 'Content-Type': 'application/json' } }; axios.request(config) .then((response) => { console.log(JSON.stringify(response.data)); }) .catch((error) => { console.log(error); }); ``` ```python Python theme={null} import requests url = "https://doc-api.oppiwallet.com/api/v1/transactions" headers = { "signatureToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "Content-Type": "application/json" } response = requests.get(url, headers=headers) print(response.json()) ``` ```go Go theme={null} package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://doc-api.oppiwallet.com/api/v1/transactions" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("signatureToken", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(string(body)) } ``` ```php PHP theme={null} "https://doc-api.oppiwallet.com/api/v1/transactions", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "Content-Type: application/json" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ?> ``` ## Response Returns an array of transaction objects. Unique identifier for the transaction. The address where funds were sent. The address where funds were deposited. The order ID reference for the transaction. Tag associated with the transaction, if any. The cryptocurrency used in the transaction. The transaction amount. Status of the callback. Timestamp when the transaction was created. Status of the transaction. 0=Pending, 1=Completed, 2=Failed ```json 200 OK theme={null} [ { "transactionId": "03ea5d69-9ebf-4bfc-9b77-3aec6a6784d6", "receiverAddress": "0xAB710B08A....E02421Ff9Ef231Ee212", "depositAddress": "0xd5350F580....2bC925a07091b443732", "orderId": "ORDER_1", "tag": "", "currency": "ETH", "amount": "0.01", "callbackStatus": 0, "createdAt": "2024-05-09T06:05:20.087Z", "status": 0 } ] ``` ```json 400 Bad Request theme={null} { "message": "Error message" } ``` # Deposit Source: https://docs.oppiwallet.com/en/api-reference/endpoints/deposit POST /createTransactionRequest This API is used to create a transaction request for deposit. ## Authentication A JWT token required for API authentication. Generate JWT token as explained in section Generate JWT Token using empty string. ## Headers Must be set to `application/json`. ## Request Body Assets Currency id. Provide amount for transaction. Pass orderId for your reference. ```bash cURL theme={null} curl --request POST \ --url https://doc-api.oppiwallet.com/api/v1/createTransactionRequest \ --header 'signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \ --header 'Content-Type: application/json' \ --data '{ "currency": "6698aec7f188ae24c673da1c", "amount": "0.01", "orderId": "ORDER_1" }' ``` ```javascript JavaScript theme={null} const axios = require('axios'); let data = JSON.stringify({ "currency": "6698aec7f188ae24c673da1c", "amount": "0.01", "orderId": "ORDER_1" }); let config = { method: 'post', maxBodyLength: Infinity, url: 'https://doc-api.oppiwallet.com/api/v1/createTransactionRequest', headers: { 'signatureToken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmkiOiJjcmVhdGVUcmFuc2FjdGlvblJlcXVlc3QiLCJpYXQiOjE3MTUxNTM2NTQsImV4cCI6MTcxNTE1MzcwOSwia2V5Ijoicmh0TmJELU9yTFQteFp3M3QtMkpFWnR4Iiwic2lnbmF0dXJlU3RyaW5nIjoiMWVjY2M1NDc0YWZiMzU4NDExNDEzNjBkOGQ0MDBlMWYxOWIzNRjYzVkM2YxNTRjNmQ5YjViNSJ9.JuF7d8Oc4EyMvm7s5g3CN9L9Wbl_TFI_yO8jt20dvHw', 'Content-Type': 'application/json' }, data: data }; axios.request(config) .then((response) => { console.log(JSON.stringify(response.data)); }) .catch((error) => { console.log(error); }); ``` ```python Python theme={null} import requests url = "https://doc-api.oppiwallet.com/api/v1/createTransactionRequest" headers = { "signatureToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "Content-Type": "application/json" } data = { "currency": "6698aec7f188ae24c673da1c", "amount": "0.01", "orderId": "ORDER_1" } response = requests.post(url, headers=headers, json=data) print(response.json()) ``` ```go Go theme={null} package main import ( "bytes" "encoding/json" "fmt" "net/http" "io/ioutil" ) func main() { url := "https://doc-api.oppiwallet.com/api/v1/createTransactionRequest" data := map[string]string{ "currency": "6698aec7f188ae24c673da1c", "amount": "0.01", "orderId": "ORDER_1", } jsonData, _ := json.Marshal(data) req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData)) req.Header.Add("signatureToken", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(string(body)) } ``` ```php PHP theme={null} "6698aec7f188ae24c673da1c", "amount" => "0.01", "orderId" => "ORDER_1" ]; curl_setopt_array($curl, [ CURLOPT_URL => "https://doc-api.oppiwallet.com/api/v1/createTransactionRequest", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "Content-Type: application/json" ], CURLOPT_POSTFIELDS => json_encode($data), ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ?> ``` ## Response Returns the transaction details upon successful request. The address for the deposit. The amount that was deposited. The tag associated with the transaction. Unique identifier for the transaction. ```json 200 OK theme={null} { "address": "0x6648C29C6FD8........eD9Eb964c6F838bF", "amount": "0.0001", "tag": "2165464", "transactionId": "0866f8-4a53-4579-9274-351ec868a627" } ``` ```json 400 Bad Request theme={null} { "message": "Error message" } ``` # Wallet Balance Source: https://docs.oppiwallet.com/en/api-reference/endpoints/get-balance GET /balance/{currencyId} This API is used for get user wallet balance. ## Authentication A JWT token required for API authentication. Generate JWT token as explained in section Generate JWT Token using empty string. ## Headers Must be set to `application/json`. ## Path Parameters The ID of the currency for which to retrieve the balance. ## Request No request body is required for this endpoint. ```bash cURL theme={null} curl --request GET \ --url 'https://doc-api.oppiwallet.com/api/v1/balance/6698aec7f188ae24c673da1c' \ --header 'signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \ --header 'Content-Type: application/json' ``` ```javascript JavaScript theme={null} const axios = require('axios'); let config = { method: 'get', maxBodyLength: Infinity, url: 'https://doc-api.oppiwallet.com/api/v1/balance/6698aec7f188ae24c673da1c', headers: { 'signatureToken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmkiOiJjcmVhdGVUcmFuc2FjdGlvblJlcXVlc3QiLCJpYXQiOjE3MTUxNTM2NTQsImV4cCI6MTcxNTE1MzcwOSwia2V5Ijoicmh0TmJELU9yTFQteFp3M3QtMkpFWnR4Iiwic2lnbmF0dXJlU3RyaW5nIjoiMWVjY2M1NDc0YWZiMzU4NDExNDEzNjBkOGQ0MDBlMWYxOWIzNRjYzVkM2YxNTRjNmQ5YjViNSJ9.JuF7d8Oc4EyMvm7s5g3CN9L9Wbl_TFI_yO8jt20dvHw', 'Content-Type': 'application/json' } }; axios.request(config) .then((response) => { console.log(JSON.stringify(response.data)); }) .catch((error) => { console.log(error); }); ``` ```python Python theme={null} import requests currency_id = "6698aec7f188ae24c673da1c" url = f"https://doc-api.oppiwallet.com/api/v1/balance/{currency_id}" headers = { "signatureToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "Content-Type": "application/json" } response = requests.get(url, headers=headers) print(response.json()) ``` ```go Go theme={null} package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://doc-api.oppiwallet.com/api/v1/balance/6698aec7f188ae24c673da1c" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("signatureToken", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(string(body)) } ``` ```php PHP theme={null} "https://doc-api.oppiwallet.com/api/v1/balance/{$currencyId}", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "Content-Type: application/json" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ?> ``` ## Response Returns the current balance for the specified currency. The available balance in the wallet for the specified currency. ```json 200 OK theme={null} { "balance": 0.564333586 } ``` ```json 400 Bad Request theme={null} { "message": "Error message" } ``` ```json 404 Not Found theme={null} { "message": "Currency not found" } ``` # Supported Currencies Source: https://docs.oppiwallet.com/en/api-reference/endpoints/supported-currencies GET /supportedCurrency This API is used to retrieve a list of supported currencies. ## Authentication A JWT token required for API authentication. Generate JWT token as explained in section Generate JWT Token using empty string. ## Headers Must be set to `application/json`. ## Response Returns a list of supported currencies. The name of the currency. The symbol of the currency. The number of decimal places supported. The price in USD. The price in EUR. The price in TRY. The minimum payment amount accepted. Unique identifier for the currency. ```bash cURL theme={null} curl --request GET \ --url https://doc-api.oppiwallet.com/api/v1/supportedCurrency \ --header 'signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \ --header 'Content-Type: application/json' ``` ```javascript JavaScript theme={null} const axios = require('axios'); let config = { method: 'get', maxBodyLength: Infinity, url: 'https://doc-api.oppiwallet.com/api/v1/supportedCurrency', headers: { 'signatureToken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmkiOiJjcmVhdGVUcmFuc2FjdGlvblJlcXVlc3QiLCJpYXQiOjE3MTUxNTM2NTQsImV4cCI6MTcxNTE1MzcwOSwia2V5Ijoicmh0TmJELU9yTFQteFp3M3QtMkpFWnR4Iiwic2lnbmF0dXJlU3RyaW5nIjoiMWVjY2M1NDc0YWZiMzU4NDExNDEzNjBkOGQ0MDBlMWYxOWIzNRjYzVkM2YxNTRjNmQ5YjViNSJ9.JuF7d8Oc4EyMvm7s5g3CN9L9Wbl_TFI_yO8jt20dvHw', 'Content-Type': 'application/json' } }; axios.request(config) .then((response) => { console.log(JSON.stringify(response.data)); }) .catch((error) => { console.log(error); }); ``` ```python Python theme={null} import requests url = "https://doc-api.oppiwallet.com/api/v1/supportedCurrency" headers = { "signatureToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "Content-Type": "application/json" } response = requests.get(url, headers=headers) print(response.json()) ``` ```go Go theme={null} package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://doc-api.oppiwallet.com/api/v1/supportedCurrency" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("signatureToken", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(string(body)) } ``` ```php PHP theme={null} "https://doc-api.oppiwallet.com/api/v1/supportedCurrency", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "Content-Type: application/json" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ?> ``` ```json 200 OK theme={null} [ { "name": "Bitcoin", "symbol": "BTC", "decimal": 18, "usdPrice": "0.4573", "eurPrice": "0.421934928", "tryPrice": "14.934817532999999", "minPaymentAmount": "1", "id": "6698aec7f188ae24c673da1c" } ] ``` ```json 400 Bad Request theme={null} { "message": "Error message" } ``` # Transaction Source: https://docs.oppiwallet.com/en/api-reference/endpoints/transaction GET /transaction/{transactionId} This API is used to retrieve details of a specific transaction. ## Authentication A JWT token required for API authentication. Generate JWT token as explained in section Generate JWT Token using empty string. ## Headers Must be set to `application/json`. ## Path Parameters The unique identifier of the transaction you want to retrieve. ## Query Parameters Transaction type: 1 for deposit transaction and 2 for withdraw transaction. ## Request No request body is required for this endpoint. ```bash cURL theme={null} curl --request GET \ --url 'https://doc-api.oppiwallet.com/api/v1/transaction/03ea5d69-9ebf-4bfc-9b77-3aec6a6784d6?transactionType=1' \ --header 'signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \ --header 'Content-Type: application/json' ``` ```javascript JavaScript theme={null} const axios = require('axios'); let config = { method: 'get', maxBodyLength: Infinity, url: 'https://doc-api.oppiwallet.com/api/v1/transaction/03ea5d69-9ebf-4bfc-9b77-3aec6a6784d6?transactionType=1', headers: { 'signatureToken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmkiOiJjcmVhdGVUcmFuc2FjdGlvblJlcXVlc3QiLCJpYXQiOjE3MTUxNTM2NTQsImV4cCI6MTcxNTE1MzcwOSwia2V5Ijoicmh0TmJELU9yTFQteFp3M3QtMkpFWnR4Iiwic2lnbmF0dXJlU3RyaW5nIjoiMWVjY2M1NDc0YWZiMzU4NDExNDEzNjBkOGQ0MDBlMWYxOWIzNRjYzVkM2YxNTRjNmQ5YjViNSJ9.JuF7d8Oc4EyMvm7s5g3CN9L9Wbl_TFI_yO8jt20dvHw', 'Content-Type': 'application/json' } }; axios.request(config) .then((response) => { console.log(JSON.stringify(response.data)); }) .catch((error) => { console.log(error); }); ``` ```python Python theme={null} import requests transaction_id = "03ea5d69-9ebf-4bfc-9b77-3aec6a6784d6" url = f"https://doc-api.oppiwallet.com/api/v1/transaction/{transaction_id}" headers = { "signatureToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "Content-Type": "application/json" } params = { "transactionType": 1 } response = requests.get(url, headers=headers, params=params) print(response.json()) ``` ```go Go theme={null} package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://doc-api.oppiwallet.com/api/v1/transaction/03ea5d69-9ebf-4bfc-9b77-3aec6a6784d6?transactionType=1" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("signatureToken", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(string(body)) } ``` ```php PHP theme={null} "https://doc-api.oppiwallet.com/api/v1/transaction/{$transactionId}?transactionType={$transactionType}", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => [ "signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "Content-Type: application/json" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ?> ``` ## Response Returns the details of the requested transaction. Unique identifier for the transaction. The address where funds were sent. The address where funds were deposited. The order ID reference for the transaction. Tag associated with the transaction, if any. The cryptocurrency used in the transaction. The transaction amount. Status of the callback. Timestamp when the transaction was created. Status of the transaction. 0=Pending, 1=Completed, 2=Failed ```json 200 OK theme={null} { "transactionId": "03ea5d69-9ebf-4bfc-9b77-3aec6a6784d6", "receiverAddress": "0xAB710B08A....E02421Ff9Ef231Ee212", "depositAddress": "0xd5350F580....2bC925a07091b443732", "orderId": "ORDER_1", "tag": "", "currency": "ETH", "amount": "0.01", "callbackStatus": 0, "createdAt": "2024-05-09T06:05:20.087Z", "status": 0 } ``` ```json 400 Bad Request theme={null} { "message": "Error message" } ``` ```json 404 Not Found theme={null} { "message": "Transaction not found" } ``` # Withdraw (Auto) Source: https://docs.oppiwallet.com/en/api-reference/endpoints/withdraw-auto POST /autoWithdraw This API is used to make automatic withdraw to external address. Make sure you follow below instructions otherwise it will not work. ## Instructions ### Source Code * Download script from here ### Required Stuff * Linux Server * Node JS (v18.19.1 or later) ### Setup * Open config.json file and replace mnemonic, apiKey, encKey. * Execute pair.js file using: `node pair.js`. It will install required packages. * Next you need to start crypto.ts on your server. ## Authentication A JWT token required for API authentication. Generate JWT token as explained in section Generate JWT Token using empty string. ## Headers Must be set to `application/json`. ## Request Body Assets Currency id. Provide amount for transaction. The external address where funds will be sent. Include the orderId in your request for reference. ```bash cURL theme={null} curl --request POST \ --url https://doc-api.oppiwallet.com/api/v1/autoWithdraw \ --header 'signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \ --header 'Content-Type: application/json' \ --data '{ "currency": "6698aec7f188ae24c673da1c", "amount": "0.01", "address": "0xb6b5E02EBf4d20......3AfAbA034f2F8D8D07", "orderId": "order_12345" }' ``` ```javascript JavaScript theme={null} const axios = require('axios'); let data = JSON.stringify({ "currency": "6698aec7f188ae24c673da1c", "amount": "0.01", "address": "0xb6b5E02EBf4d20......3AfAbA034f2F8D8D07", "orderId": "order_12345" }); let config = { method: 'post', maxBodyLength: Infinity, url: 'https://doc-api.oppiwallet.com/api/v1/autoWithdraw', headers: { 'signatureToken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlcmlNilsInR5cCI6IkpsdfsdfHJlcXVlc3QiLCJpYXQiOjE3MTUxNTM2NTQsImV4cCI6MTcxNTE1MzcwOSwia2V5Ijoicmh0TmJELU9yTFQteFp3M3QtMkpFWnR4Iiwic2lnbmF0dXJlU3RyaW5nIjoiMWVjY2M1NDc0YWZiMzU4NDExNDEzNjBkOGQ0MDBlMWYxOWIzNRjYzVkM2YxNTRjNmQ5YjViNSJ9.JuF7d8Oc4EyMvm7s5g3CN9L9Wbl_TFI_yO8jt20dvHw', 'Content-Type': 'application/json' }, data: data }; axios.request(config) .then((response) => { console.log(JSON.stringify(response.data)); }) .catch((error) => { console.log(error); }); ``` ```python Python theme={null} import requests url = "https://doc-api.oppiwallet.com/api/v1/autoWithdraw" headers = { "signatureToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "Content-Type": "application/json" } data = { "currency": "6698aec7f188ae24c673da1c", "amount": "0.01", "address": "0xb6b5E02EBf4d20......3AfAbA034f2F8D8D07", "orderId": "order_12345" } response = requests.post(url, headers=headers, json=data) print(response.json()) ``` ```go Go theme={null} package main import ( "bytes" "encoding/json" "fmt" "net/http" "io/ioutil" ) func main() { url := "https://doc-api.oppiwallet.com/api/v1/autoWithdraw" data := map[string]string{ "currency": "6698aec7f188ae24c673da1c", "amount": "0.01", "address": "0xb6b5E02EBf4d20......3AfAbA034f2F8D8D07", "orderId": "order_12345", } jsonData, _ := json.Marshal(data) req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData)) req.Header.Add("signatureToken", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(string(body)) } ``` ```php PHP theme={null} "6698aec7f188ae24c673da1c", "amount" => "0.01", "address" => "0xb6b5E02EBf4d20......3AfAbA034f2F8D8D07", "orderId" => "order_12345" ]; curl_setopt_array($curl, [ CURLOPT_URL => "https://doc-api.oppiwallet.com/api/v1/autoWithdraw", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "Content-Type: application/json" ], CURLOPT_POSTFIELDS => json_encode($data), ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ?> ``` ```javascript NodeJS theme={null} const axios = require('axios'); let data = JSON.stringify({ "currency": "6698aec7f188ae24c673da1c", "amount": "0.01", "address": "0xb6b5E02EBf4d20......3AfAbA034f2F8D8D07", "orderId": "order_12345" }); let config = { method: 'post', maxBodyLength: Infinity, url: 'https://doc-api.oppiwallet.com/api/v1/autoWithdraw', headers: { 'signatureToken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlcmlNilsInR5cCI6IkpsdfsdfHJlcXVlc3QiLCJpYXQiOjE3MTUxNTM2NTQsImV4cCI6MTcxNTE1MzcwOSwia2V5Ijoicmh0TmJELU9yTFQteFp3M3QtMkpFWnR4Iiwic2lnbmF0dXJlU3RyaW5nIjoiMWVjY2M1NDc0Iiwic2lnbmF0dXJlU3RyaW5nIjoiMWVjY2M1NDc0YWZiMzU4NDExNDEzNjBkOGQ0MDBlMWYxOWIzNRjYzVkM2YxNTRjNmQ5YjViNSJ9.JuF7d8Oc4EyMvm7s5g3CN9L9Wbl_TFI_yO8jt20dvHw', 'Content-Type': 'application/json' }, data: data }; axios.request(config) .then((response) => { console.log(JSON.stringify(response.data)); }) .catch((error) => { console.log(error); }); ``` ## Response Returns a success message upon successful request. Success message for the withdrawal request. Unique identifier for the transaction. ```json 200 OK theme={null} { "message": "Your withdrawal request has been sent successfully.", "transactionId": "0866f8-4a53-4579-9274-351ec868a627" } ``` ```json 400 Bad Request theme={null} { "message": "Error message" } ``` ```json 422 Unprocessable Entity theme={null} { "message": "Your withdrawal transaction has failed.", "transactionId": "0866f8-4a53-4579-9274-351ec868a627" } ``` # Withdraw (Manual) Source: https://docs.oppiwallet.com/en/api-reference/endpoints/withdraw-manual POST /manualWithdraw This API is used to create a manual withdrawal transaction request. ## Authentication A JWT token required for API authentication. Generate JWT token as explained in section Generate JWT Token using empty string. ## Headers Must be set to `application/json`. ## Request Body Assets Currency id. Provide amount for transaction. The external address where funds will be sent. Include the orderId in your request for reference. ```bash cURL theme={null} curl --request POST \ --url https://doc-api.oppiwallet.com/api/v1/manualWithdraw \ --header 'signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \ --header 'Content-Type: application/json' \ --data '{ "currency": "6698aec7f188ae24c673da1c", "amount": "0.01", "orderId": "ORDER_1" }' ``` ```javascript JavaScript theme={null} const axios = require('axios'); let data = JSON.stringify({ "currency": "6698aec7f188ae24c673da1c", "amount": "0.01", "orderId": "ORDER_1" }); let config = { method: 'post', maxBodyLength: Infinity, url: 'https://doc-api.oppiwallet.com/api/v1/manualWithdraw', headers: { 'signatureToken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmkiOiJjcmVhdGVUcmFuc2FjdGlvblJlcXVlc3QiLCJpYXQiOjE3MTUxNTM2NTQsImV4cCI6MTcxNTE1MzcwOSwia2V5Ijoicmh0TmJELU9yTFQteFp3M3QtMkpFWnR4Iiwic2lnbmF0dXJlU3RyaW5nIjoiMWVjY2M1NDc0YWZiMzU4NDExNDEzNjBkOGQ0MDBlMWYxOWIzNRjYzVkM2YxNTRjNmQ5YjViNSJ9.JuF7d8Oc4EyMvm7s5g3CN9L9Wbl_TFI_yO8jt20dvHw', 'Content-Type': 'application/json' }, data: data }; axios.request(config) .then((response) => { console.log(JSON.stringify(response.data)); }) .catch((error) => { console.log(error); }); ``` ```python Python theme={null} import requests url = "https://doc-api.oppiwallet.com/api/v1/manualWithdraw" headers = { "signatureToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "Content-Type": "application/json" } data = { "currency": "6698aec7f188ae24c673da1c", "amount": "0.01", "orderId": "ORDER_1" } response = requests.post(url, headers=headers, json=data) print(response.json()) ``` ```go Go theme={null} package main import ( "bytes" "encoding/json" "fmt" "net/http" "io/ioutil" ) func main() { url := "https://doc-api.oppiwallet.com/api/v1/manualWithdraw" data := map[string]string{ "currency": "6698aec7f188ae24c673da1c", "amount": "0.01", "orderId": "ORDER_1", } jsonData, _ := json.Marshal(data) req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData)) req.Header.Add("signatureToken", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(string(body)) } ``` ```php PHP theme={null} "6698aec7f188ae24c673da1c", "amount" => "0.01", "orderId" => "ORDER_1" ]; curl_setopt_array($curl, [ CURLOPT_URL => "https://doc-api.oppiwallet.com/api/v1/manualWithdraw", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_HTTPHEADER => [ "signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "Content-Type: application/json" ], CURLOPT_POSTFIELDS => json_encode($data), ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } ?> ``` ## Response Returns a success message upon successful request. Success message for the withdrawal request. Unique identifier for the transaction. ```json 200 OK theme={null} { "message": "Your withdrawal request has been sent successfully.", "transactionId": "0866f8-4a53-4579-9274-351ec868a627" } ``` ```json 400 Bad Request theme={null} { "message": "Error message" } ``` ```json 422 Unprocessable Entity theme={null} { "message": "Your withdrawal transaction has failed.", "transactionId": "0866f8-4a53-4579-9274-351ec868a627" } ``` # API Key Restrictions Source: https://docs.oppiwallet.com/en/authentication/api-key-restrictions Manage security settings and restrictions for your API keys ### IP Address Restrictions You can enhance security by limiting which IP addresses can use your API keys: 1. Navigate to the **API Keys** section in your OppiWallet dashboard 2. Select the API key you want to restrict 3. Click on **IP Restrictions** 4. Add the specific IP addresses or ranges that should have access 5. Save your changes IP restrictions help prevent unauthorized use even if your API keys are compromised. ### Key Activation Management OppiWallet lets you quickly enable or disable API keys directly from the mobile app: 1. Open the OppiWallet mobile application 2. Navigate to **Settings** → **API Keys** 3. Toggle the switch next to any key to enable or disable it This feature allows you to: * Quickly disable keys if you suspect unauthorized access * Temporarily disable keys during maintenance periods * Enable keys only when needed for specific operations ### Best Practices * **Regularly review** active API keys and their restrictions * **Implement the principle of least privilege** by creating keys with specific permissions * **Set up alerts** for unusual API activity patterns * **Rotate keys** periodically, especially for high-security integrations ### Additional Security Options Consider implementing these additional security measures: * **Rate limiting** to prevent abuse * **Request logging** for audit purposes * **Webhook notifications** for key usage events Contact OppiWallet support to learn more about advanced security options available for your account tier. # API Key Setup Source: https://docs.oppiwallet.com/en/authentication/api-key-setup Learn how to set up and manage API keys for OppiWallet ### Creating API Keys 1. **Register an account** with OppiWallet. 2. **Go to the API section** on the OppiWallet home page. 3. **Generate API keys** as needed: * You can create multiple API keys for different applications. * Each API key consists of an **Auth Key** and an **Enc Key**. ### Approval Process * New API keys require **admin approval**. * You'll receive a notification upon approval. * Once approved, integrate the keys into your system. ### Integration Details * **API Base URL**: `https://doc-api.oppiwallet.com/api` * Use your API keys in requests as per the [Authentication](/en/authentication/what-is-auth-key) guidelines. ### Security Best Practices * **Do not share** API keys publicly. * **Store securely** in environment variables or vaults. * If compromised: * Delete affected keys * Generate new keys * Update integrations # Enabling Accounts Source: https://docs.oppiwallet.com/en/authentication/enabling-accounts Understanding wallet types and account activation in OppiWallet ### Main Wallet Your Main wallet is the default wallet that's created when you register with OppiWallet. It provides comprehensive functionality for managing your crypto assets. ### Main Wallet Features With your Main wallet, you can: * **Deposit funds** from external sources * **Withdraw funds** to external wallets or exchanges * **Make trades** between different cryptocurrencies * **View transaction history** for all wallet activities * **Generate deposit addresses** for supported cryptocurrencies ### Activating Your Main Wallet Your Main wallet is automatically activated when you complete the account verification process. To ensure full functionality: 1. Complete the identity verification process 2. Set up necessary security features (2FA, withdrawal passwords) 3. Generate deposit addresses for currencies you wish to use ### Managing Your Main Wallet Access your Main wallet through: * The OppiWallet mobile application * The OppiWallet web dashboard * OppiWallet API (for developers) ### Security Recommendations To maintain the security of your Main wallet: * Enable all available security features * Use unique, strong passwords * Set up transaction notifications * Regularly review your account activity * Follow withdrawal address whitelisting procedures # Generate JWT Token Source: https://docs.oppiwallet.com/en/authentication/generate-jwt-token Learn how to create and sign JWT tokens for API authentication ### JWT Requirements Your JWT must meet the following specifications: * **Algorithm**: HS256 (HMAC SHA-256) * **Signature**: Created using SHA-256 hash * **Expiration**: Short-lived token (60 seconds) ### Creating the Signature Before generating the JWT, you need to create a signature: ```javascript theme={null} const crypto = require('crypto'); // Example values const currency = 'BTC'; const amount = '0.001'; const orderId = '12345'; // Create signature string const signatureData = `${currency}#${amount}#${orderId}`; // Generate signature hash const signature = crypto .createHash("sha256") .update(JSON.stringify(signatureData)) .digest("hex"); ``` ### JWT Payload Structure Your JWT payload must include: ```javascript theme={null} const payload = { "url": "/path/to/endpoint", // API endpoint path "iat": Date.now(), // Issued at time (milliseconds) "exp": Date.now() + 60000, // Expiration time (current time + 60 seconds) "key": "YOUR_AUTH_KEY", // Your Auth Key "signature": signature // The signature created above }; ``` **Important Notes:** * All datetime values must be in GMT format * The expiration time (`exp`) must be set to current time + 60 seconds (in milliseconds) ### Generating the JWT Use your Enc Key to sign the JWT: ```javascript theme={null} const jwt = require('jsonwebtoken'); // Create the signed token const token = jwt.sign( payload, 'YOUR_ENC_KEY', // Your Enc Key { algorithm: 'HS256' } ); // The token can now be used in your API request ``` ### Using the JWT in Requests Include the JWT in your API requests: ```javascript theme={null} const headers = { 'Authorization': `Bearer ${token}`, 'x-auth-key': 'YOUR_AUTH_KEY', 'Content-Type': 'application/json' }; // Make your API request with these headers ``` ### Troubleshooting If you encounter authentication errors: * Verify your Auth Key and Enc Key are correct and active * Check that your system clock is synchronized (JWT validation is time-sensitive) * Ensure all required payload fields are present and correctly formatted * Verify that your signature is being generated correctly # What is Auth Key? Source: https://docs.oppiwallet.com/en/authentication/what-is-auth-key Understanding the Authentication Key in OppiWallet API ### Auth Key Overview * **Function**: The Auth Key serves as your identifier when making API requests to OppiWallet * **Usage**: You must include this key with every API request * **Visibility**: This can be considered similar to a public key ### Implementation When making requests to the OppiWallet API, include your Auth Key in the request headers: ```javascript theme={null} const headers = { 'x-auth-key': 'YOUR_AUTH_KEY', 'Content-Type': 'application/json' }; ``` ### Purpose The Auth Key allows OppiWallet's systems to: * Identify which registered user is making the request * Associate the request with your specific API integration * Apply the correct permissions and rate limits to your requests ### Security Considerations While the Auth Key is similar to a public key, you should still: * Avoid unnecessarily exposing it in client-side code * Follow proper API key management practices * Use environment variables to store the key in your applications # What is Enc Key? Source: https://docs.oppiwallet.com/en/authentication/what-is-enc-key Understanding the Encryption Key in OppiWallet API ### Enc Key Overview * **Function**: The Enc Key is used to create and sign JWT (JSON Web Tokens) for API requests * **Usage**: Used to cryptographically sign requests to verify their authenticity * **Visibility**: This should be treated as a private key and kept secure ### Implementation To use your Enc Key properly: ```javascript theme={null} // Example of creating a JWT using the Enc Key const jwt = require('jsonwebtoken'); // Payload for your API request const payload = { // Your request data }; // Create a signed JWT using your Enc Key const token = jwt.sign(payload, 'YOUR_ENC_KEY', { algorithm: 'HS256', expiresIn: '1h' }); // Include this token in your request ``` ### Purpose The Enc Key enables OppiWallet's systems to: * Verify the authenticity of your requests * Ensure data integrity during transmission * Prevent unauthorized access to your account's functionality ### Security Considerations Since the Enc Key functions similarly to a private key: * **Never share** your Enc Key with third parties * **Store securely** in environment variables or secure key management services * **Rotate keys** periodically as part of security best practices * If your Enc Key is accidentally exposed: 1. Delete the compromised key immediately 2. Create a new key pair 3. Update all integrations with the new keys # Introduction Source: https://docs.oppiwallet.com/en/introduction Discover OppiWallet - The Ultimate Cryptocurrency Management Platform OppiWallet Light ## Welcome to OppiWallet OppiWallet is a comprehensive cryptocurrency management platform designed to simplify digital asset transactions. With our robust API, developers and businesses can seamlessly integrate advanced crypto wallet functionality into their applications. ### Why Choose OppiWallet? #### Multi-Currency Support Effortlessly manage Bitcoin, Ethereum, and a wide range of other cryptocurrencies using a single, unified API. #### Secure Transactions Leverage enterprise-grade security protocols to ensure the safety of your digital assets. #### Real-Time Balance Updates Access precise and up-to-date balance information across all supported cryptocurrencies. #### Flexible Withdrawal Options Choose between manual or automated withdrawal processes to suit your operational needs. #### Comprehensive Transaction History Maintain transparency with detailed transaction records for all activities. ### Getting Started Our API documentation provides step-by-step guidance for integrating OppiWallet into your applications. Whether you're building a trading platform, payment gateway, or crypto management tool, our API ensures reliable performance and straightforward implementation. Explore our documentation to learn about: * **API Key Setup** * **Available Endpoints** * **Implementation Examples** Our guides are designed to help you maximize OppiWallet’s features while adhering to top-tier security standards. ### Join the OppiWallet Ecosystem Join thousands of developers and businesses who trust OppiWallet for secure and efficient cryptocurrency management. By integrating OppiWallet, you can offer your users a seamless way to manage their digital assets. **Ready to start?** Visit the API Key Setup section to begin your integration journey today.