Lookup a Wallet
FSCO provides multiple ways to lookup wallet information. You can retrieve a wallet by its ID, address, or list all wallets in your organization.
Prerequisites
Section titled “Prerequisites”Before you begin, ensure you have:
- A valid FSCO API key
- Your application’s environment configured with the API key
- A wallet ID or address to lookup (if querying a specific wallet)
Lookup by Wallet ID
Section titled “Lookup by Wallet ID”Endpoint
Section titled “Endpoint”GET /v2/wallet/{walletId}
Example Request
Section titled “Example Request”curl -X GET https://api.fsco.io/v2/wallet/123e4567-e89b-12d3-a456-426614174000 \ -H "Authorization: Bearer $FSCO_API_KEY" \ -H "Content-Type: application/json"
import axios from 'axios';
const FSCO_API_KEY = process.env.FSCO_API_KEY;const FSCO_API_SECRET = process.env.FSCO_API_SECRET;const getWallet = async (walletId: string) => { const response = await axios.get( `https://api.fsco.io/v2/wallet/${walletId}`, { headers: { 'x-api-key': FSCO_API_KEY, 'x-api-secret': FSCO_API_SECRET, 'Content-Type': 'application/json', }, } );
console.log('Wallet details:', response.data);};
// Example usagegetWallet('123e4567-e89b-12d3-a456-426614174000');
import requestsimport os
FSCO_API_KEY = os.getenv("FSCO_API_KEY")FSCO_API_SECRET = os.getenv("FSCO_API_SECRET")
headers = { "x-api-key": FSCO_API_KEY, "x-api-secret": FSCO_API_SECRET, "Content-Type": "application/json",}
wallet_id = "123e4567-e89b-12d3-a456-426614174000"response = requests.get(f"https://api.fsco.io/v2/wallet/{wallet_id}", headers=headers)
print("Wallet details:", response.json())
using System;using System.Net.Http;using System.Net.Http.Headers;using System.Threading.Tasks;
class WalletGetter{ static async Task Main() { var apiKey = Environment.GetEnvironmentVariable("FSCO_API_KEY"); var walletId = "123e4567-e89b-12d3-a456-426614174000";
var client = new HttpClient(); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", apiKey);
var response = await client.GetAsync($"https://api.fsco.io/v2/wallet/{walletId}"); var responseString = await response.Content.ReadAsStringAsync();
Console.WriteLine("Wallet details: " + responseString); }}
Response
Section titled “Response”{ "walletId": "8c1d496f-2827-4750-a11f-74b48c11108d", "name": "My Wallet", "custodian": "fsco", "address": "0x1234567890abcdef"}
Lookup by Address
Section titled “Lookup by Address”Endpoint
Section titled “Endpoint”GET /v2/wallet/address/{address}
Example Request
Section titled “Example Request”curl -X GET https://api.fsco.io/v2/wallet/address/0x1234...abcd \ -H "Authorization: Bearer $FSCO_API_KEY" \ -H "Content-Type: application/json"
import axios from 'axios';
const FSCO_API_KEY = process.env.FSCO_API_KEY;const FSCO_API_SECRET = process.env.FSCO_API_SECRET;const getWallet = async (walletAddress: string) => { const response = await axios.get( `https://api.fsco.io/v2/wallet/address/${walletAddress}`, { headers: { 'x-api-key': FSCO_API_KEY, 'x-api-secret': FSCO_API_SECRET, 'Content-Type': 'application/json', }, } );
console.log('Wallet details:', response.data);};
// Example usagegetWallet('0x1234...abcd');
import requestsimport os
FSCO_API_KEY = os.getenv("FSCO_API_KEY")
headers = { "Authorization": f"Bearer {FSCO_API_KEY}", "Content-Type": "application/json",}
wallet_address = "0x1234...abcd"response = requests.get( f"https://api.fsco.io/v2/wallet/address/{wallet_address}", headers=headers)
print("Wallet details:", response.json())
using System;using System.Net.Http;using System.Net.Http.Headers;using System.Threading.Tasks;
class WalletGetter{ static async Task Main() { var apiKey = Environment.GetEnvironmentVariable("FSCO_API_KEY"); var walletAddress = "0x1234...abcd";
var client = new HttpClient(); client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", apiKey);
var response = await client.GetAsync($"https://api.fsco.io/v2/wallet/address/{walletAddress}"); var responseString = await response.Content.ReadAsStringAsync();
Console.WriteLine("Wallet details: " + responseString); }}
Response
Section titled “Response”{ "walletId": "8c1d496f-2827-4750-a11f-74b48c11108d", "name": "My Wallet", "custodian": "fsco", "address": "0x1234567890abcdef"}
List All Wallets
Section titled “List All Wallets”Endpoint
Section titled “Endpoint”GET /v2/wallet
Query Parameters
Section titled “Query Parameters”All parameters are optional:
search
: Filter wallets by name (string)page
: Page number for pagination (default: 1)pageSize
: Number of items per page (default: 10)
Example Request
Section titled “Example Request”curl -X GET "https://api.fsco.io/v2/wallet?search=My%20wallet&page[number]=1&page[size]=10" \ -H "Authorization: Bearer $FSCO_API_KEY" \ -H "Content-Type: application/json"
import axios from 'axios';
const FSCO_API_KEY = process.env.FSCO_API_KEY;const FSCO_API_SECRET = process.env.FSCO_API_SECRET;const listWallets = async () => { const response = await axios.get( 'https://api.fsco.io/v2/wallet', { params: { search: 'My wallet', // Optional: Filter wallets by name page: 1, // Optional: Page number (default: 1) pageSize: 10 // Optional: Items per page (default: 10) }, headers: { 'x-api-key': FSCO_API_KEY, 'x-api-secret': FSCO_API_SECRET, 'Content-Type': 'application/json', }, } );
console.log('Wallets:', response.data);};
listWallets();
import requestsimport os
FSCO_API_KEY = os.environ.get("FSCO_API_KEY")
def list_wallets(): response = requests.get( "https://api.fsco.io/v2/wallet", params={"search": "My wallet", "page": 1, "pageSize": 10}, headers={ "Authorization": f"Bearer {FSCO_API_KEY}", "Content-Type": "application/json", }, )
print("Wallets:", response.json())
list_wallets()
using System;using System.Net.Http;using System.Net.Http.Headers;using System.Threading.Tasks;
class WalletLister{ static async Task Main() { var apiKey = Environment.GetEnvironmentVariable("FSCO_API_KEY"); var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", apiKey); client.DefaultRequestHeaders.Add("Content-Type", "application/json");
// Optional parameters: search, page, and pageSize var response = await client.GetAsync("https://api.fsco.io/v2/wallet?search=My%20wallet&page[number]=1&page[size]=10"); var responseString = await response.Content.ReadAsStringAsync();
Console.WriteLine("Wallets: " + responseString); }}
Response
Section titled “Response”{ "wallets": [ { "walletId": "8c1d496f-2827-4750-a11f-74b48c11108d", "name": "My First Wallet", "custodian": "fsco", "address": "0x1234567890abcdef" }, { "walletId": "9d2e507g-3938-5861-b22g-85b59c12219e", "name": "My Second Wallet", "custodian": "dfns", "address": "0xabcdef1234567890" } ], "query": { "page": 1, "pageSize": 10, "totalPages": 1, "totalCount": 2 }}
Important Notes
Section titled “Important Notes”- Wallet IDs must be valid UUIDs
- Addresses are case-insensitive
- The list endpoint supports pagination for efficient data retrieval
- Results are scoped to your organization