Onramp

Onramp transaction endpoints for converting fiat currency to stablecoins

Get onramp quote

post

Get a real-time quote for an onramp transaction including exchange rate, settlement time, and payment rail information.

Authorizations
X-Service-KeystringRequired

Your Switch API service key. Contact us at hello@onSwitch.xyz to obtain your service key.

Body
amountnumberRequired
countrystring · enumRequiredPossible values:
assetstring · enumRequiredPossible values:
currencystring · enumOptional

Optional currency code. If not specified, defaults to the country's local currency.

Possible values:
railstring · enumOptional

Optional payment rail. If not specified, defaults to the country's default rail.

Possible values:
exact_outputbooleanOptionalDefault: false
Responses
200

Successfully retrieved onramp quote

application/json
post
/onramp/quote

Initiate onramp transaction

post

Initiate a fiat to stablecoin transaction.

Authorizations
X-Service-KeystringRequired

Your Switch API service key. Contact us at hello@onSwitch.xyz to obtain your service key.

Body
amountnumberRequired
countrystring · enumRequiredPossible values:
currencystring · enumOptional

Optional currency code. If not specified, defaults to the country's local currency.

Possible values:
assetstring · enumRequiredPossible values:
exact_outputbooleanOptionalDefault: false
callback_urlstring · uriOptional
referencestring · uuidOptional
railstring · enumOptional

Optional payment rail. If not specified, defaults to the country's default rail.

Possible values:
Responses
200

Successfully initiated onramp transaction

application/json
post
/onramp/initiate

Last updated