Request Quote

Endpoint

POST {{baseUrl}}/exchange-rate

Description

This endpoint retrieves the exchange rate between two specified currencies. The request must include the source and target currencies, method ID, and method type (either "payin" or "payout"). The request requires bearer token authentication.

Request

Headers

  • Authorization: Bearer YOUR_ACCESS_TOKEN

  • Content-Type: application/json

Request Body

{
    "from_currency" : "USD",
    "to_currency": "GBP",
    "method_id": 331,
    "method_type": "payin"
}

import requests
import json

url = "{{baseUrl}}/exchange-rate"
headers = {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "Content-Type": "application/json"
}
data = {
    "from_currency": "USD",
    "to_currency": "GBP",
    "method_id": 331,
    "method_type": "payin"
}

response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.json())

Response

Example Success Response

{
  "status": "success",
  "status_code": 200,
  "message": "Exchange rate retrieved successfully",
  "data": {
    "from_currency": "USD",
    "to_currency": "GBP",
    "exchange_rate": 0.75,
    "method_id": 331,
    "method_type": "payin",
    "timestamp": "2024-07-03T12:00:00Z"
  }
}

Last updated