Sandbox Deposit
curl --request POST \
--url https://api.ondoperps.xyz/v1/sandbox_deposit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "1000.00",
"symbol": "USDC",
"deposit_destination": {
"id": "10458932786832481",
"wallet": "margin"
},
"chain_id": "eth-mainnet"
}
'import requests
url = "https://api.ondoperps.xyz/v1/sandbox_deposit"
payload = {
"amount": "1000.00",
"symbol": "USDC",
"deposit_destination": {
"id": "10458932786832481",
"wallet": "margin"
},
"chain_id": "eth-mainnet"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: '1000.00',
symbol: 'USDC',
deposit_destination: {id: '10458932786832481', wallet: 'margin'},
chain_id: 'eth-mainnet'
})
};
fetch('https://api.ondoperps.xyz/v1/sandbox_deposit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ondoperps.xyz/v1/sandbox_deposit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '1000.00',
'symbol' => 'USDC',
'deposit_destination' => [
'id' => '10458932786832481',
'wallet' => 'margin'
],
'chain_id' => 'eth-mainnet'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ondoperps.xyz/v1/sandbox_deposit"
payload := strings.NewReader("{\n \"amount\": \"1000.00\",\n \"symbol\": \"USDC\",\n \"deposit_destination\": {\n \"id\": \"10458932786832481\",\n \"wallet\": \"margin\"\n },\n \"chain_id\": \"eth-mainnet\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.ondoperps.xyz/v1/sandbox_deposit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"1000.00\",\n \"symbol\": \"USDC\",\n \"deposit_destination\": {\n \"id\": \"10458932786832481\",\n \"wallet\": \"margin\"\n },\n \"chain_id\": \"eth-mainnet\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ondoperps.xyz/v1/sandbox_deposit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"1000.00\",\n \"symbol\": \"USDC\",\n \"deposit_destination\": {\n \"id\": \"10458932786832481\",\n \"wallet\": \"margin\"\n },\n \"chain_id\": \"eth-mainnet\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"result": {
"deposit_address": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18",
"txn_hash": "0xabc123def456..."
}
}{
"success": false,
"error": "Description of the error",
"error_code": "invalid_network"
}{
"success": false,
"error": "Description of the error",
"error_code": "auth_missing"
}{
"success": false,
"error": "Description of the error",
"error_code": "account_not_allowed"
}{
"success": false,
"error": "Description of the error",
"error_code": "too_many_requests"
}{
"success": false,
"error": "Description of the error",
"error_code": "unknown"
}Sandbox
Sandbox Deposit
Credits the account with funds in sandbox environment only.
POST
/
v1
/
sandbox_deposit
Sandbox Deposit
curl --request POST \
--url https://api.ondoperps.xyz/v1/sandbox_deposit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": "1000.00",
"symbol": "USDC",
"deposit_destination": {
"id": "10458932786832481",
"wallet": "margin"
},
"chain_id": "eth-mainnet"
}
'import requests
url = "https://api.ondoperps.xyz/v1/sandbox_deposit"
payload = {
"amount": "1000.00",
"symbol": "USDC",
"deposit_destination": {
"id": "10458932786832481",
"wallet": "margin"
},
"chain_id": "eth-mainnet"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: '1000.00',
symbol: 'USDC',
deposit_destination: {id: '10458932786832481', wallet: 'margin'},
chain_id: 'eth-mainnet'
})
};
fetch('https://api.ondoperps.xyz/v1/sandbox_deposit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ondoperps.xyz/v1/sandbox_deposit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '1000.00',
'symbol' => 'USDC',
'deposit_destination' => [
'id' => '10458932786832481',
'wallet' => 'margin'
],
'chain_id' => 'eth-mainnet'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ondoperps.xyz/v1/sandbox_deposit"
payload := strings.NewReader("{\n \"amount\": \"1000.00\",\n \"symbol\": \"USDC\",\n \"deposit_destination\": {\n \"id\": \"10458932786832481\",\n \"wallet\": \"margin\"\n },\n \"chain_id\": \"eth-mainnet\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.ondoperps.xyz/v1/sandbox_deposit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": \"1000.00\",\n \"symbol\": \"USDC\",\n \"deposit_destination\": {\n \"id\": \"10458932786832481\",\n \"wallet\": \"margin\"\n },\n \"chain_id\": \"eth-mainnet\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ondoperps.xyz/v1/sandbox_deposit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": \"1000.00\",\n \"symbol\": \"USDC\",\n \"deposit_destination\": {\n \"id\": \"10458932786832481\",\n \"wallet\": \"margin\"\n },\n \"chain_id\": \"eth-mainnet\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"result": {
"deposit_address": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18",
"txn_hash": "0xabc123def456..."
}
}{
"success": false,
"error": "Description of the error",
"error_code": "invalid_network"
}{
"success": false,
"error": "Description of the error",
"error_code": "auth_missing"
}{
"success": false,
"error": "Description of the error",
"error_code": "account_not_allowed"
}{
"success": false,
"error": "Description of the error",
"error_code": "too_many_requests"
}{
"success": false,
"error": "Description of the error",
"error_code": "unknown"
}Authorizations
BearerAuthApiKeyAuth
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Deposit amount as a decimal string
Example:
"1000.00"
Token symbol
Example:
"USDC"
Show child attributes
Show child attributes
Chain ID for the deposit
Available options:
avax-c-chain, avax-fuji-c-chain, eth-mainnet, eth-sepolia, btc-mainnet, btc-testnet, sol-mainnet, sol-testnet, bsc-mainnet, bsc-testnet Example:
"eth-mainnet"
Response
Deposit result
Whether the request was successful
Example:
true
Error message, present only on failure
Example:
""
Semantic error code. See each endpoint's error responses for the specific codes it can return.
Deprecation notice, if applicable
Example:
""
Show child attributes
Show child attributes
⌘I