OxaPay Docs
v1
v1
  • Introduction
    • Welcome to OxaPay
    • Integrations
      • Payment Link
      • Donation Service
      • Merchant Service
      • Payout Service
      • Swap Service
      • Plugins
        • WooCommerce
        • WISECP
        • Clientexec
        • Blesta
        • WHMCS
        • PrestaShop
        • Easy Digital Downloads
        • Paid Memberships Pro
        • Gravity Forms
        • Restrict Content Pro
  • API Reference
    • Payment
      • Generate Invoice
      • Generate White Label
      • Generate Static Address
      • Revoking Static Address
      • Static Address List
      • Payment Information
      • Payment History
      • Accepted Currencies
      • Payment Status Table
    • Payout
      • Generate Payout
      • Payout Information
      • Payout History
      • Payout Status Table
    • Swap
      • Swap Request
      • Swap History
      • Swap Pairs
      • Swap Calculate
      • Swap Rate
    • Common
      • Account Balance
      • Prices
      • Supported Currencies
      • Supported Fiat Currencies
      • Supported Networks
      • System Status
    • Error
  • Webhook
  • Use Cases
Powered by GitBook
On this page
  • API Request Sample Codes
  • API Response Example
  1. API Reference
  2. Common

Prices

PreviousAccount BalanceNextSupported Currencies

Last updated 3 months ago

This endpoint allows you to retrieve the current prices of all cryptocurrencies supported by OxaPay.

GET https://api.oxapay.com/v1/common/prices

{
  "data": { 
      [key: string]: decimal // Represents dynamic keys (currency symbol) with decimal values.
   },
  "message": string, // A message containing additional information about the result of the request.
  "error": {
    "type": string,
    "key": string,
    "message": string
  } || {}, // An object that provides details about any errors that occurred.
  "status": integer, // The status of the request response. Typically provided as a numeric code (e.g., 200 for success or other codes for errors).
  "version": string // The version of the API being used.
}

Please note that a successful request will return status 200. In case of any issues or validation problems, refer to the corresponding for further details.

API Request Sample Codes

curl -X GET https://api.oxapay.com/v1/common/prices 
<?php

$url = 'https://api.oxapay.com/v1/common/prices';

$options = array(
    'http' => array(
        'method' => 'GET'
    ),
);

$context  = stream_context_create($options);
$response = file_get_contents($url, false, $context);
if ($response === FALSE) {
    die('Error occurred');
}

$result = json_decode($response, true);
var_dump($result);
?>
const axios = require('axios');

const url = 'https://api.oxapay.com/v1/common/prices';

axios.get(url)
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    console.error(error);
  });
import requests

url = 'https://api.oxapay.com/v1/common/prices'

response = requests.get(url)
result = response.json()
print(result)

These example code snippets demonstrate how to request the "Prices" endpoint using different programming languages. You can customize the data parameters according to your specific requirements.

API Response Example

{
  "data": {
    "DOGE": 0.3341700000,
    "BNB": 695.7900000000,
    "XMR": 198.4200000000,
    "BTC": 94876.5500000000,
    "ETH": 3301.4500000000,
    "USDC": 1.0001000000,
    "POL": 0.4591000000,
    "SOL": 191.3500000000,
    "NOT": 0.0059799000,
    "SHIB": 0.0000216300,
    "TRX": 0.2422000000,
    "USDT": 1.0000000000,
    "DOGS": 0.0004590000,
    "TON": 5.2515000000,
    "BCH": 433.5000000000,
    "DGB": 0.0124400000,
    "LTC": 103.9900000000
  },
  "message": "Operation completed successfully!",
  "error": {},
  "status": 200,
  "version": "1.0.3"
}

The response example above is provided to help you understand the format and structure of the response. If you have any further questions or need assistance, please feel free to contact to your account manager.

error