Routes
A route is a corridor your company is enabled for: a destination country, currency and payout method, along with its fees and remaining limits.
get_routesβ
Lists the corridors your company is enabled for, optionally filtered by source currency.
Signatureβ
def get_routes(self, source_currency: Optional[str] = None) -> RoutesResponse:
Parametersβ
| Name | Type | Required | Description |
|---|---|---|---|
source_currency | Optional[str] | No | Filter by source currency. Omit (or pass None) to list every route your company is enabled for. Sent as the sourceCurrency query parameter. |
Returnsβ
RoutesResponse:
| Field | Type | Description |
|---|---|---|
routes | Optional[List[Route]] | The enabled corridors. |
Route:
| Field | Type | Description |
|---|---|---|
name | Optional[str] | Route name, e.g. "BANK_TRANSFER-VE". |
method | Optional[str] | Payout method for this corridor β see Payout type. |
country | Optional[str] | Destination country. |
currency | Optional[str] | Destination currency. |
rate | Optional[str] | Indicative rate β a decimal string (e.g. "852.79"), same as every other amount on the wire. The rate that actually applies to a transfer is the one locked into its quotation. |
fees | Optional[List[RouteFee]] | Pricing rules β pricing_rule, pricing_type, percentage_value, flat_value, pricing_label. |
limits | Optional[RouteLimits] | per_transaction (PerTransactionLimit: min/max decimal strings), transaction (TransactionWindows of daily/weekly/monthly TransactionWindow: max/current/remaining counts), fund (FundWindows of daily/weekly/monthly FundWindow: max/current/remaining decimal strings). |
Exampleβ
routes = client.get_routes("USDR")
for r in routes.routes or []:
print(r.name, r.country, r.currency, r.rate)
Errorsβ
B2B_UNAUTHORIZEDβ bad token or bad request signature.ValueErrorβ raised locally whensource_currencyis present but blank.
Notesβ
- Call it with no
source_currencyto list every route your company is enabled for. rateis indicative β do not use it to compute a payout amount. Use theexchange_ratefrom a quotation instead.