Ramp Network REST API V2 Reference
This page describes version 2 of our available REST API (we recommend to refer to the latest version which can be found here).
General info
API base path: https://api.ramp.network/api
All request and response bodies should be in JSON, with corresponding application/json
headers.
If an error is returned, the response body is also a JSON object, with a code
property describing the problem,
and optionally more properties providing additional details.
ℹ️ All endpoints are subject to rate limiting.
Available assets and prices
Endpoint: GET /host-api/v2/assets
Query parameters:
currencyCode
(optional): sets the fiat currency that will be used inminPurchaseAmount
,maxPurchaseAmount
,minFeeAmount
,networkFee
properties. If no value is provided, EUR is used as a default setting.hostApiKey
(optional): if you have a custom integration, provide the key to access your enabled features.- If provided, the response will contain an
enabledFeatures
property with a list of the features enabled. - Contact us at partner@ramp.network if you want a custom integration :)
- If provided, the response will contain an
userIp
(optional): string representing an IP address.- The
assets
field in the response will include only the assets available in the geolocation associated with the provided IP.
- The
withDisabled
(optional): boolean parameter - if it'strue
, assets withenabled: false
will be returned. Use this param to receive assets that are temporarily disabled, for example due to maintenance.withHidden
(optional): boolean parameter - if it'strue
, assets withhidden: true
will be returned.
Response contents
interface HostAssetsConfig {
assets: AssetInfo[];
enabledFeatures?: string[];
currencyCode: string;
minPurchaseAmount: number;
maxPurchaseAmount: number;
minFeeAmount: number;
// Final fee percentage depends on the payment method and purchase size.
minFeePercent: number;
maxFeePercent: number;
}
interface AssetInfo {
// Asset symbol, e.g. ETH, DAI, BTC
symbol: string;
// Asset descriptive name, e.g. Ethereum
name: string;
// Number of decimal places to convert units to whole coins
decimals: number;
// Asset type -- blockchain type for native assets (e.g. ETH, BTC, ELROND), or a token standard (e.g. ERC20)
type: string;
// Token contract address, if applicable (if the asset is not the chain native asset)
address?: string;
logoUrl: string;
enabled: boolean;
hidden: boolean;
// Approximate price of a single whole asset unit (1 ETH/DAI/...) per currency code. Please note that the actual price may vary
price: Dictionary<number>;
currencyCode: string;
// Asset-specific purchase limits, -1 means unlimited (global limits are used)
minPurchaseAmount: number;
maxPurchaseAmount: number;
minPurchaseCryptoAmount: string; // in wei/units
// Network fee for the asset added on top of Ramp Network's fee
networkFee: number;
}
Example
Request:
curl -X GET https://api.ramp.network/api/host-api/v2/assets
Response:
{
"currencyCode": "EUR",
"minPurchaseAmount": 10,
"maxPurchaseAmount": 10000,
"minFeeAmount": 3,
"minFeePercent": 0.5,
"maxFeePercent": 2.99,
"assets": [
{
"address": "0x0000....",
"symbol": "ETH",
"name": "Ether",
"decimals": 18,
"type": "ETH",
"enabled": true,
"logoUrl": "https://assets.ramp.network/crypto-assets/eth.svg",
"hidden": false,
"networkFee": 0.01,
"price": {
"EUR": 146.204351612996,
"PLN": 34.36787710229498,
"USD": 130.94295070798083,
"GBP": 123.30407161114876
},
"currencyCode": "EUR",
"minPurchaseAmount": -1,
"maxPurchaseAmount": -1,
"minPurchaseCryptoAmount": "-1"
},
{
"address": "0x0000....",
"symbol": "DAI",
"name": "Multi-Collateral DAI",
"decimals": 18,
"type": "ERC20",
"enabled": true,
"logoUrl": "https://assets.ramp.network/crypto-assets/dai.svg",
"networkFee": 0,
"hidden": false,
"price": {
"EUR": 0.906651167794897,
"PLN": 0.21312413458052976,
"USD": 0.8120112559176902,
"GBP": 0.7646405820808438
},
"currencyCode": "EUR",
"minPurchaseAmount": -1,
"maxPurchaseAmount": 15,
"minPurchaseCryptoAmount": "-1"
}
]
}