Listing channel currencies and networks
Two lookups return the currencies and networks available for channels across the platform. Use them to build a currency and network selector in your own interface: the currencies lookup gives you the codes and symbols to display, the networks lookup gives you the network codes to send. Neither reflects your account's configuration — to see which combinations are enabled for you, use Listing channel currency pairs.
To build a selector:
Call Listing channel currencies and offer the entries with
crypto: trueas the currency the end user deposits.Call Listing channel networks and group the entries by
currencyCode. Shownameto the user and passcodeas thepayNetworkparameter of Create channel.
Both lookups are paginated and return up to 50 entries per page by default.
Listing channel currencies
GET /api/public/v1/channels/currencies
Returns every cryptocurrency that has a network on the platform, plus all fiat currencies. Fiat currencies are listed because a channel can settle into a fiat account (targetCurrency) and display amounts in one (localCurrency).
Headers
Content-Type
application/vnd.api+json
Authorization
Bearer <api_key>
URL Parameters
page
integer
Page number, starting from 1. Defaults to 1.
per_page
integer
Entries per page. Defaults to 50, maximum 100.
cURL
curl "https://api.sandbox.txn.io/api/public/v1/channels/currencies" \
-H 'Content-Type: application/vnd.api+json' \
-H 'Authorization: Bearer <api_key>'Response Body
data[].id
string
Currency code. Same as code.
data[].type
string
Always currencies.
data[].attributes.code
string
Currency code.
data[].attributes.crypto
boolean
true for cryptocurrencies, false for fiat.
data[].attributes.symbol
string
Display symbol for the currency.
data[].attributes.subunitToUnit
number
Number of smallest units in one whole unit (e.g. 100000000 for BTC, 100 for EUR).
data[].relationships.networks
object
Placeholder only; network objects are not included in this response. Use the networks lookup below.
meta.page
number
Current page.
meta.per_page
number
Entries per page.
meta.total
number
Total number of currencies.
Response
The sample is shortened to three entries.
Listing channel networks
GET /api/public/v1/channels/networks
Returns every network on the platform. Not every network can be used for channels on your account: Listing channel currency pairs shows the payCurrency and targetCurrency combinations that are enabled for you.
Headers
Content-Type
application/vnd.api+json
Authorization
Bearer <api_key>
URL Parameters
page
integer
Page number, starting from 1. Defaults to 1.
per_page
integer
Entries per page. Defaults to 50, maximum 100.
cURL
Response Body
data[].id
string
Network ID.
data[].type
string
Always network.
data[].attributes.code
string
Network code. Pass it as the payNetwork parameter in [Create channel](creating-channel.md).
data[].attributes.name
string
Human-readable network name, suitable for display.
data[].attributes.currencyCode
string
Code of the currency carried on this network.
meta.page
number
Current page.
meta.per_page
number
Entries per page.
meta.total
number
Total number of networks.
Response
The sample is shortened to three entries.
Last updated