Fund Wallet
curl --request POST \
--url https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <x-api-key>' \
--data '
{
"amount": 10,
"token": "usdc",
"chain": "base-sepolia"
}
'import requests
url = "https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances"
payload = {
"amount": 10,
"token": "usdc",
"chain": "base-sepolia"
}
headers = {
"X-API-KEY": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({amount: 10, token: 'usdc', chain: 'base-sepolia'})
};
fetch('https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 10,
'token' => 'usdc',
'chain' => 'base-sepolia'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances"
payload := strings.NewReader("{\n \"amount\": 10,\n \"token\": \"usdc\",\n \"chain\": \"base-sepolia\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<x-api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances")
.header("X-API-KEY", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 10,\n \"token\": \"usdc\",\n \"chain\": \"base-sepolia\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 10,\n \"token\": \"usdc\",\n \"chain\": \"base-sepolia\"\n}"
response = http.request(request)
puts response.read_body[
{
"token": "usdc",
"decimals": 6,
"balances": {
"base": "121000000",
"ethereum": "121000000",
"total": "242000000"
}
},
{
"token": "eth",
"decimals": 18,
"balances": {
"ethereum": "1000000000000000000",
"total": "1000000000000000000"
}
}
]{
"error": true,
"message": "<error message>"
}Wallets
Fund Wallet
Send funds to a wallet.
API scope required: wallets.fund
POST
/
v1-alpha2
/
wallets
/
{walletLocator}
/
balances
Fund Wallet
curl --request POST \
--url https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <x-api-key>' \
--data '
{
"amount": 10,
"token": "usdc",
"chain": "base-sepolia"
}
'import requests
url = "https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances"
payload = {
"amount": 10,
"token": "usdc",
"chain": "base-sepolia"
}
headers = {
"X-API-KEY": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({amount: 10, token: 'usdc', chain: 'base-sepolia'})
};
fetch('https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 10,
'token' => 'usdc',
'chain' => 'base-sepolia'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances"
payload := strings.NewReader("{\n \"amount\": 10,\n \"token\": \"usdc\",\n \"chain\": \"base-sepolia\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<x-api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances")
.header("X-API-KEY", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 10,\n \"token\": \"usdc\",\n \"chain\": \"base-sepolia\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/v1-alpha2/wallets/{walletLocator}/balances")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 10,\n \"token\": \"usdc\",\n \"chain\": \"base-sepolia\"\n}"
response = http.request(request)
puts response.read_body[
{
"token": "usdc",
"decimals": 6,
"balances": {
"base": "121000000",
"ethereum": "121000000",
"total": "242000000"
}
},
{
"token": "eth",
"decimals": 18,
"balances": {
"ethereum": "1000000000000000000",
"total": "1000000000000000000"
}
}
]{
"error": true,
"message": "<error message>"
}This is an alpha API and subject to change.
This endpoint is only available in staging and only supports USDC and USDXM.
Headers
API key required for authentication
Path Parameters
A wallet locator can be of the format:
<walletAddress>email:<email>:<walletType>userId:<userId>:<walletType>userId:<userId>:<walletType>(white label user example)phoneNumber:<phoneNumber>:<walletType>twitter:<handle>:<walletType>x:<handle>:<walletType>
Body
application/json
Parameters required to fund a wallet
The amount of currency to fund the wallet with. Between 1 and 100
Required range:
1 <= x <= 100Example:
10
The currency to fund the wallet with
Available options:
usdc, usdxm Example:
"usdc"
The chain to fund the wallet with
Available options:
arbitrum-sepolia, avalanche-fuji, base-sepolia, barret-testnet, ethereum-sepolia, optimism-sepolia, polygon-amoy, sei-atlantic-2-testnet, skale-nebula-testnet, soneium-minato-testnet, viction-testnet Example:
"base-sepolia"
Response
Funds sent successfully.
The token
Available options:
ape, bnb, coti, eth, matic, mnt, pol, sei, chz, avax, xai, fuel, hbar, vic, ip, zcx, u2u, usdc, usdce, busd, usdxm, usdt, credit, weth, degen, brett, toshi, eurc, superverse, pirate, wld, bonk, trump, fartcoin, giga, moodeng, jailstool, wen, mlg, duo, pep, harambe, usedcar, vine, fartboy, pnut, stonks, mew, baby, michi, butthole, anglerfish, usa, chillguy, sigma, maneki, purpe, lockin, y2k, fafo, nub, fullsend, shoggoth, mini, llm, sc, fatgf, pwease, popcat, spx, fwog, mother, wif, fric, etf, gyat, bigballs, goat, stupid, duko, bitcoin, buttcoin, mcdull, skbdi, elon4afd, mumu, gme, biao, fred, pengu, asscoin, bhad, habibi, quant, hammy, boden, dolan, nap, scf, titcoin, zerebro, rfc, luce, melania, slerf, bome, ban, pippin, ghibli, figure, retardio, memesai, dogeai, memecoin, routine, troll, nobody, italianrot, jockey, pppp, useless, gork, hosico, neet, urmom, bert, fog, mog, boopa, wizard, trencher, chacha, aurafarm, sol, sui, apt, sfuel, xion Example:
"eth"
The number of decimals of the token
Example:
18
The balance of the wallet in different chains
Show child attributes
Show child attributes
Example:
[
{
"token": "usdc",
"decimals": 6,
"balances": {
"base": "121000000",
"ethereum": "121000000",
"total": "242000000"
}
},
{
"token": "eth",
"decimals": 18,
"balances": {
"ethereum": "1000000000000000000",
"total": "1000000000000000000"
}
}
]
Was this page helpful?

