cURL
curl --request POST \
--url https://sandbox.onconsul.com/v1/deposits/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"source_bank_account_id": "<string>",
"receiver_amount": "<string>",
"sender_amount": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
source_bank_account_id: '<string>',
receiver_amount: '<string>',
sender_amount: '<string>'
})
};
fetch('https://sandbox.onconsul.com/v1/deposits/quote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.onconsul.com/v1/deposits/quote"
payload := strings.NewReader("{\n \"source_bank_account_id\": \"<string>\",\n \"receiver_amount\": \"<string>\",\n \"sender_amount\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}import requests
url = "https://sandbox.onconsul.com/v1/deposits/quote"
payload = {
"source_bank_account_id": "<string>",
"receiver_amount": "<string>",
"sender_amount": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"created_at": "2023-11-07T05:31:56Z",
"destination": {
"amount": "<string>",
"currency": "USDC",
"chain": "ethereum",
"min_amount": "<string>",
"payment_method": "usd_ach"
},
"id": "<string>",
"market_rate": "<string>",
"source": {
"amount": "<string>",
"currency": "USDC",
"account_id": "<string>",
"chain": "ethereum",
"payment_method": "usd_ach"
},
"time_estimate_seconds": 123,
"expires_at": "2023-11-07T05:31:56Z",
"fee": {
"currency": "USDC",
"flat_fee": "<string>",
"percentage_fee": "<string>"
},
"is_ach_debit": true
}{
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Deposits
Create a Deposit Quote
POST
/
deposits
/
quote
cURL
curl --request POST \
--url https://sandbox.onconsul.com/v1/deposits/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"source_bank_account_id": "<string>",
"receiver_amount": "<string>",
"sender_amount": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
source_bank_account_id: '<string>',
receiver_amount: '<string>',
sender_amount: '<string>'
})
};
fetch('https://sandbox.onconsul.com/v1/deposits/quote', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.onconsul.com/v1/deposits/quote"
payload := strings.NewReader("{\n \"source_bank_account_id\": \"<string>\",\n \"receiver_amount\": \"<string>\",\n \"sender_amount\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}import requests
url = "https://sandbox.onconsul.com/v1/deposits/quote"
payload = {
"source_bank_account_id": "<string>",
"receiver_amount": "<string>",
"sender_amount": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"created_at": "2023-11-07T05:31:56Z",
"destination": {
"amount": "<string>",
"currency": "USDC",
"chain": "ethereum",
"min_amount": "<string>",
"payment_method": "usd_ach"
},
"id": "<string>",
"market_rate": "<string>",
"source": {
"amount": "<string>",
"currency": "USDC",
"account_id": "<string>",
"chain": "ethereum",
"payment_method": "usd_ach"
},
"time_estimate_seconds": 123,
"expires_at": "2023-11-07T05:31:56Z",
"fee": {
"currency": "USDC",
"flat_fee": "<string>",
"percentage_fee": "<string>"
},
"is_ach_debit": true
}{
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Request a quote to convert fiat currency into USDC.
The currency and payment rail are determined by the
linked bank account.
The response includes the exchange rate, fees,
and estimated settlement time.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
OK
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes

