Base URL
https://external.dev.onboardpay.co
https://api-3p.onboard.xyz
List of endpoints
Trade options
This endpoint provides a list of supported fiat currencies, blockchain networks, payment channels, and transaction limits supported by Onboard. users to configure their trades.Sample Request
Sample Request
URL
GET /exchange/api/orders/trade-options
Sample Response
Sample Response
Response
{
"fiats": [
{
"name": "Nigerian Naira",
"isoCode": "NGN",
"symbol": "NGN",
"logo": "https://s3.us-west-2.amazonaws.com/country-flags-staging.getonboard.co/NG.png",
"unicodeSymbol": "₦",
"transactionLimits": {
"kyc": {
"minSingleTransactionLimit": 86.12310458350001,
"maxSingleTransactionLimit": 3444924.18334,
"dailyTransactionLimit": 10334772.55002
},
"noKyc": {
"minSingleTransactionLimit": 86.12310458350001,
"maxSingleTransactionLimit": 43061.55229175,
"dailyTransactionLimit": 43061.55229175,
"maxLifetimeLimit": 43061.55229175
}
}
},
{
"name": "US Dollar",
"isoCode": "USD",
"symbol": "USD",
"logo": "https://s3.us-west-2.amazonaws.com/country-flags-staging.getonboard.co/US.png",
"unicodeSymbol": "$",
"transactionLimits": {
"kyc": {
"minSingleTransactionLimit": 0.05,
"maxSingleTransactionLimit": 2000,
"dailyTransactionLimit": 6000
},
"noKyc": {
"minSingleTransactionLimit": 0.05,
"maxSingleTransactionLimit": 25,
"dailyTransactionLimit": 25,
"maxLifetimeLimit": 25
}
}
},
...
],
"networks": [
{
"name": "Binance Smart Chain Testnet",
"networkId": "bsc_testnet",
"chainId": 97,
"nativeAsset": "BNB",
"explorer": "https://testnet.bscscan.com",
"availableTokens": [
{
"symbol": "BNB",
"isNative": true
},
{
"symbol": "USDT",
"isNative": false
}
]
},
{
"name": "Base Sepolia Testnet",
"networkId": "base_sepolia",
"chainId": 84532,
"nativeAsset": "ETH",
"explorer": "https://sepolia.basescan.org",
"availableTokens": [
{
"symbol": "ETH",
"isNative": true
},
{
"symbol": "USDC",
"isNative": false
}
]
},
...
],
"transactionLimitsConfig": {
"kyc": {
"minSingleTransactionLimit": 0.05, // in USD
"maxSingleTransactionLimit": 2000, // in USD
"dailyTransactionLimit": 6000 // in USD
},
"noKyc": {
"minSingleTransactionLimit": 0.05, // in USD
"maxSingleTransactionLimit": 25, // in USD
"dailyTransactionLimit": 25, // in USD
"maxLifetimeLimit": 25 // in USD
}
},
"paymentChannels": [
{
"paymentChannelId": "BANK_TRANSFER_NIGERIA",
"name": "Bank Transfer - Nigeria",
"supportedCurrencies": [
{
"country": "NG",
"currency": "NGN"
}
]
},
{
"paymentChannelId": "BANK_TRANSFER_SOUTH_AFRICA",
"name": "Bank Transfer - South Africa",
"supportedCurrencies": [
{
"country": "ZA",
"currency": "ZAR"
}
]
},
...
]
}
Explanation of key properties
- fiats
- networks
- transactionLimitsConfig
- paymentChannels
| Property | Description |
|---|---|
name | Full name of the fiat currency. |
isoCode | ISO 4217 code representing the currency. |
symbol | Symbol for the currency. |
unicodeSymbol | Unicode character for the currency. |
logo | URL to the flag or icon representing the currency. |
| Property | Description |
|---|---|
name | Full name of the blockchain network. |
networkId | Identifier used within Onboard for the network. |
chainId | Standard chain ID for the blockchain. |
nativeAsset | Native token used for transactions on the network. |
explorer | URL to the blockchain explorer for the network. |
| Property | Description |
|---|---|
kyc | Limits for users with KYC verification, denominated in USD. |
noKyc | Limits for users without KYC verification, denominated in USD. Contains an additional maxLifetimeLimit property, which specifies the total allowable transaction limit over the lifetime of a user without completing KYC verification. |
| Property | Description |
|---|---|
paymentChannelId | Unique ID for the payment channel. |
name | Display name for the payment channel. |
supportedCurrencies | Array of countries and their currencies supported by the channel. |
Get trade URL
Returns the trade URL for the paramaters provided. The URL retuned in the response can then be used in a browser / web view to start an ONRAMP / OFFRAMPSample Parameters
Sample Parameters
URL
GET /exchange/api/orders/trade-url&apiKey=onb_test_f284e796ffe4ae3426bddd6f05f098cf&product=web3&tradeType=sell&fiat=NGN&token=USDT&tokenAmount=1&networkId=bsc_testnet&autoselect=true
Sample Response
Sample Response
Response
{
"tradeUrl": "https://app.dev.onboardpay.co/express/confirm?cexOrderId=51&fiat=NGN&token=USDT&walletAddress=0x0a1756f20c3993eAEaeD87934a6aa95936ac889d&tradeType=Sell&network=bsc_testnet&tokenAmount=1&offerId=d1bf4ad0-22ff-43de-aecb-c0ebfb85bc51&product=WEB3&thirdPartyOrderTradeId=fb34dc78-00e4-463a-8f1b-c617c634b148"
}
Start trade
This endpoint can be used in place ofGet Trade URL, which returns the trade url in JSON. Instead, the Start trade endpoint automatically resolves to the trade URL. This endpoint is best used to initiate trades within a browser or webview.
https://external.dev.onboardpay.co/exchange/orders/trade?apiKey=<API_KEY>&product=web3&<TRADE_QUERY_PARAMETERS>
https://api-3p.onboard.xyz/exchange/orders/trade?apiKey=<API_KEY>&product=web3&<TRADE_QUERY_PARAMETERS>
Sample mobile app integration
For mobile apps, the redirect link can be used within an embedded browser or webview component.🤖 Android
🤖 Android
To integrate Connect to your Android app, see the
Java and Kotlin snippets below:import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;
import androidx.appcompat.app.AppCompatActivity;
public class MainActivity extends AppCompatActivity {
private WebView webView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
webView = findViewById(R.id.webView);
WebSettings webSettings = webView.getSettings();
webSettings.setJavaScriptEnabled(true);
// Load the URL
webView.loadUrl("https://external.dev.onboardpay.co/exchange/orders/trade?apiKey=<API_KEY>&product=web3&<TRADE_QUERY_PARAMETERS>");
}
}
import android.os.Bundle
import android.webkit.WebSettings
import android.webkit.WebView
import androidx.appcompat.app.AppCompatActivity
class MainActivity : AppCompatActivity() {
private lateinit var webView: WebView
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
webView = findViewById(R.id.webView)
val webSettings: WebSettings = webView.settings
webSettings.javaScriptEnabled = true
// Load the URL
webView.loadUrl("https://external.dev.onboardpay.co/exchange/orders/trade?apiKey=<API_KEY>&product=web3&<TRADE_QUERY_PARAMETERS>")
}
}
🍏 iOS
🍏 iOS
To integrate Connect to your iOS app, see the
Swift and Flutter snippets below:import UIKit
import WebKit
class ViewController: UIViewController, WKNavigationDelegate {
@IBOutlet var webView: WKWebView!
override func viewDidLoad() {
super.viewDidLoad()
// Set the WKWebView navigation delegate
webView.navigationDelegate = self
// Load the URL
if let url = URL(string: "https://external.dev.onboardpay.co/exchange/orders/trade?apiKey=<API_KEY>&product=web3&<TRADE_QUERY_PARAMETERS>") {
let request = URLRequest(url: url)
webView.load(request)
}
}
}
class WebViewExample extends StatefulWidget {
@override
_WebViewExampleState createState() => _WebViewExampleState();
}
class _WebViewExampleState extends State<WebViewExample> {
final String url = "https://external.dev.onboardpay.co/exchange/orders/trade?apiKey=<API_KEY>&product=web3&<TRADE_QUERY_PARAMETERS>";
final Completer<WebViewController> _controller =
Completer<WebViewController>();
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("Onboard Test App"),
),
body: WebView(
initialUrl: url,
onWebViewCreated: (WebViewController webViewController) {
_controller.complete(webViewController);
},
),
);
}
}
Get an order’s current price
Sample Parameters
Sample Parameters
URL
GET ?apiKey=&product=web3&tradeType=Sell&fiat=NGN&token=USDT&tokenAmount=120299&networkId=bsc_testnet
Sample Response
Sample Response
Response
{
"price": 1400
}