This page provides comprehensive API reference documentation for all available endpoints in the Two-Coin payment system.
https://api.dev2coin.space/apiAll endpoints are prefixed with /api (e.g., /api/on_ramp/orders)
Important: Currency references use integer IDs from the currency dictionary, not ticker symbols (e.g., use 35 for USD, 15 for BTC).
Dictionary endpoints provide reference data that should be cached on startup.
https://api.dev2coin.space/api/dict/currenciesFetch all available currencies with their integer IDs. Cache this response daily.
⚠️ Required first: Call this endpoint before using any other endpoints to build a currency ID lookup table.
Response:
{
"currencies": [
{
"id": 35,
"ticker": "USD",
"currency_type": "fiat",
"precision": 2,
"name": "US Dollar",
"icon_url": "..."
},
{
"id": 15,
"ticker": "BTC",
"network": "bitcoin",
"currency_type": "crypto",
"precision": 8,
"name": "Bitcoin",
"icon_url": "..."
}
]
}https://api.dev2coin.space/api/dict/countriesFetch all countries with their states/provinces. Use this for country/state selection UI.
Response:
{
"countries": [
{
"code": "US",
"name": "United States",
"icon_url": "...",
"states": [
{ "code": "CA", "name": "California" },
{ "code": "NY", "name": "New York" }
]
}
]
}Endpoints for cryptocurrency purchase flow (on-ramp).
https://api.dev2coin.space/api/on_ramp/payment_methodsGet available payment methods for a fiat currency and country.
Required Query Parameters:
fiat_currency - Currency ID (integer, e.g., 35 for USD)Optional Query Parameters:
country_code - Two-letter country code (e.g., US)state - State code (e.g., CA, NY)provider_codes - Comma-separated provider codesResponse:
{
"payment_methods": [
{
"code": "card",
"name": "Credit/Debit Card",
"icon_url": "..."
}
]
}https://api.dev2coin.space/api/on_ramp/payment_methods_extra_infoGet fee information for payment methods from a specific provider.
Required Query Parameters:
provider_code - Provider code (e.g., changelly, kado)Response:
{
"payment_methods": [
{
"payment_method_code": "card",
"fee": "3.5%"
}
]
}https://api.dev2coin.space/api/on_ramp/offersGet available offers from multiple providers based on currency pair and amount.
Required Query Parameters:
external_user_id - Your internal user IDcurrency_from - Source currency ID (integer)currency_to - Target currency ID (integer)amount_from - Amount to exchange (string)country - Two-letter country codeOptional Query Parameters:
state - State code (required if country has states in dictionary)ip - User IP addresspayment_method - Filter by payment method codeprovider_codes - Comma-separated list to filter providersResponse: Object with provider codes as keys
{
"changelly": {
"rate": "0.000025",
"inverted_rate": "40000.00",
"fee": "4.99",
"amount_from": "100.00",
"amount_expected_to": "0.002375",
"payment_methods": [
{ "payment_method_code": "card", "fee": "3.5%" }
]
},
"kado": {
"rate": "0.0000251",
"inverted_rate": "39841.27",
"fee": "3.99",
"amount_from": "100.00",
"amount_expected_to": "0.002410"
}
}https://api.dev2coin.space/api/on_ramp/ordersCreate a new cryptocurrency purchase order.
⚠️ Use integer currency IDs (from currency dictionary), not ticker symbols.
https://api.dev2coin.space/api/on_ramp/orders/{provider_code}Get status of a specific order. Requires code query parameter.
https://api.dev2coin.space/api/on_ramp/countriesGet list of countries supported by on-ramp providers.
Optional Query Parameters:
provider_codes - Comma-separated list to filter by providersResponse:
{
"countries": [
{ "code": "US", "states": ["CA", "NY", "TX"] },
{ "code": "GB" },
{ "code": "DE" }
]
}https://api.dev2coin.space/api/on_ramp/currency_pairsGet available currency pairs grouped by provider.
Required Query Parameters:
country_code - Two-letter country codeOptional Query Parameters:
state - State code (for US)provider_codes - Comma-separated list to filterResponse: Array of provider currency pairs
[
{
"provider_code": "changelly",
"fiat_currencies": [35, 6, 49],
"crypto_currencies": [15, 22, 2]
},
{
"provider_code": "kado",
"fiat_currencies": [35],
"crypto_currencies": [15, 22]
}
]https://api.dev2coin.space/api/on_ramp/providersGet providers supporting a specific currency pair in a country.
Required Query Parameters:
country_code - Two-letter country codefrom_currency - Source currency ID (integer)to_currency - Target currency ID (integer)Optional Query Parameters:
state - State codeprovider_codes - Comma-separated list to filterResponse:
{
"providers": [
{
"code": "changelly",
"name": "Changelly",
"description": "...",
"icon_url": "..."
},
{
"code": "kado",
"name": "Kado",
"description": "...",
"icon_url": "..."
}
]
}https://api.dev2coin.space/api/on_ramp/validate-addressValidate a wallet address before creating an order.
Request Body:
{
"provider_code": "changelly",
"currency": 15,
"wallet_address": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
}Response:
{
"result": true
}Returns true if the wallet address is valid for the specified cryptocurrency, false otherwise.
❌ Wrong: {"from_currency": "USD", "to_currency": "BTC"}
✅ Correct: {"from_currency": 35, "to_currency": 15}
Always use integer currency IDs from the GET /api/dict/currencies endpoint.
New to Two-Coin? Start with the Complete Integration Flow guide for a step-by-step walkthrough with examples.
If you encounter any issues or have questions not addressed in this documentation, please contact our support team on Telegram at https://t.me/cs_2coin (@cs_2coin).