Docs
  • What We Do
  • Supported Countries, Payment Methods, and Cryptocurrencies
  • Getting Started
  • Integration Guides
    • API
      • Required Headers
      • Create a User
      • Assign a Deposit Address
      • KYC
      • Link and Verify a Bank Account
        • Re-link Bank Account
        • Update Bank Account
        • Delete Bank Account
      • Transaction Limits
      • Buy Crypto (ACH)
      • Transaction Monitoring
      • Transaction History
    • React Native
      • Installation
      • Session Token and Wallet Signing
      • Preset Order Details
      • Example
      • Reference
      • Release History
      • User experience
        • Sign up
        • Sign in
        • Buy crypto
        • Settings & activity
    • React JS (Beta)
      • Installation
      • Session Token and Wallet Signing
      • Preset Orders
      • Callbacks
      • Theming
      • Example
      • Reference
      • Release History
  • API Reference
    • Endpoints
      • Auth
        • Crypto Wallet
        • Email OTP
        • SMS OTP
      • Activity
      • Bank
      • Client
      • Config
      • Crypto
      • Users
      • Wallets
      • Webhook Registrations
    • Custom Headers
    • Error Codes
    • Types Glossary
    • Postman
    • Open API Specification
    • Webhooks
  • Design Reference
    • UI/UX Starter kit
    • UI Requirements
  • Guides
    • Sandbox Testing
    • User Authentication
    • Link a new Signing Wallet to an Existing User
    • Plaid Bank Linking
      • Plaid OAuth Support
    • Client Dashboard (Alpha)
  • User Support Reference
    • User Account Flags
      • KYC Review
      • Transaction Processing
      • NSFs and Returned Payments
      • Fraud
    • Transactional Emails
Powered by GitBook
On this page

Was this helpful?

  1. API Reference
  2. Endpoints

Crypto

PreviousConfigNextUsers

Last updated 1 year ago

Was this helpful?

Overview

API endpoints here pertain to any operations we expose on the cryptocurrency or networks. For example, you would use these APIs to retrieve the current prices for cryptocurrencies to display to your users.

Please see our list of supported currencies or our Currency enum for reference on formatting and network support.

You will need to provide either fiatAmount or minCryptoAmount.

fiatAmount - The total amount in fiat to be exchanged. Fees will be top down.

minCryptoAmount - The minimum amount in crypto to be exchanged for. Fees will be bottom up.

{
    "fiatAmount": "100",
    "type": "INSTANT",
    "cryptoCurrency": "ETH"
}
{
    "fiat": {
        "currency": "USD",
  	"amount": "100.00",
        "direction": "CREDIT",
  	"fundingMethod": "ACH_ORIGINATED_INSTANT"
    },
    "crypto": {
        "currency": "ETH",
        "direction": "DEBIT",
  	"amount": "0.04956182056",
  	"price": "1910.54",
  	"ratioFee": "3.00",
  	"networkFee": "2.31"
    }
}
curl --location -g --request POST 'https://api.ratio.me/v1/crypto/estimates:ach' \
--header 'ratio-client-id: <YOUR_CLIENT_ID>' \
--header 'ratio-client-secret: <YOUR_CLIENT_SECRET>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data-raw '{
    "fiatAmount": "100",
    "type": "INSTANT",
    "cryptoCurrency": "ETH"
}'