Fetch trade url
curl --request GET \
--url https://external.dev.onboardpay.co/exchange/api/orders/trade-urlimport requests
url = "https://external.dev.onboardpay.co/exchange/api/orders/trade-url"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://external.dev.onboardpay.co/exchange/api/orders/trade-url', 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://external.dev.onboardpay.co/exchange/api/orders/trade-url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://external.dev.onboardpay.co/exchange/api/orders/trade-url"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://external.dev.onboardpay.co/exchange/api/orders/trade-url")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.dev.onboardpay.co/exchange/api/orders/trade-url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"tradeUrl": "<string>"
}{
"code": "UNKNOWN_ERROR",
"message": "Request could not be completed due to an error",
"data": {}
}{
"code": "UNKNOWN_ERROR",
"message": "Request could not be completed due to an error",
"data": {}
}{
"code": "UNKNOWN_ERROR",
"message": "Request could not be completed due to an error",
"data": {}
}Orders
Get Trade URL
GET
/
exchange
/
api
/
orders
/
trade-url
Fetch trade url
curl --request GET \
--url https://external.dev.onboardpay.co/exchange/api/orders/trade-urlimport requests
url = "https://external.dev.onboardpay.co/exchange/api/orders/trade-url"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://external.dev.onboardpay.co/exchange/api/orders/trade-url', 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://external.dev.onboardpay.co/exchange/api/orders/trade-url",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://external.dev.onboardpay.co/exchange/api/orders/trade-url"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://external.dev.onboardpay.co/exchange/api/orders/trade-url")
.asString();require 'uri'
require 'net/http'
url = URI("https://external.dev.onboardpay.co/exchange/api/orders/trade-url")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"tradeUrl": "<string>"
}{
"code": "UNKNOWN_ERROR",
"message": "Request could not be completed due to an error",
"data": {}
}{
"code": "UNKNOWN_ERROR",
"message": "Request could not be completed due to an error",
"data": {}
}{
"code": "UNKNOWN_ERROR",
"message": "Request could not be completed due to an error",
"data": {}
}Generate a trade URL using specified parameters such as fiat currency, token, trade type, and network.
This URL redirects users to the Onboard web interface to complete transactions and is ideal for low-code integrations with Onboard Connect.
Query Parameters
CEX api key
Integration product in use e.g web3 or custodial
Available options:
WEB3, CUSTODIAL Order ID generated for offramp trades
Type of trade
Available options:
BUY, SELL Symbol of fiat currency
Fiat amount
Symbol of token asset
Token amount
Onboard blockchain network identifier or chain Id e.g Base will be base or 8453 or 0x2105
Wallet address to be debited/credited in order
Payment channel
Customer's email address
Offer auto select flag
Response
Success
Response for a successful create order command
Http link for CEX to redirect to