Wallet

All the available functionality related to an account.

Get Balance

Returns the chain's native balance for the wallet address. For Solana, will return in SOL etc.

Query Params

  • network: Solana blockchain environment (testnet/devnet/mainnet-beta)

  • wallet: Wallet address

GET /sol/v1/wallet/balance

var myHeaders = new Headers();
myHeaders.append("x-api-key", "YOUR_API_KEY");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/wallet/balance?network=devnet&wallet=97a3giHcGsk8YoEgWv4rP1ooWwJBgS72fpckZM6mQiFH", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Send Sol

Transfer SOL from one wallet to another

BODY (raw)

  • network: Solana blockchain environment (testnet/devnet/mainnet-beta)

  • from_address: Wallet address of the sender

  • to_address: Wallet address of the receiver

  • amount: How much to send

POST /sol/v1/wallet/send_sol

var myHeaders = new Headers();
myHeaders.append("x-api-key", "-3iYNcRok7Gm4EMl");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "network": "devnet",
  "from_address": "BFefyp7jNF5Xq2A4JDLLFFGpxLq5oPEFKBAQ46KJHW2R",
  "to_address": "2fmz8SuNVyxEP6QwKQs6LNaT2ATszySPEJdhUDesxktc",
  "amount": 1.2
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/wallet/send_sol", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Get Token Balance

Get the balance of a particular token in a wallet (Supports Token 2022 token info 🆕)

Query Params

  • network: Solana blockchain environment (testnet/devnet/mainnet-beta)

  • wallet: Wallet address

  • token: Fungible token address

GET /sol/v1/wallet/token_balance

var myHeaders = new Headers();
myHeaders.append("x-api-key", "-3iYNcRok7Gm4EMl");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/wallet/token_balance?network=mainnet-beta&wallet=BNZPZfmuoWFjvnPRasn6oxWF326Mq2jXv6JpY2AdcqbU&token=FLUXBmPhT3Fd1EDVFdg46YREqHBeNypn1h4EbnTzWERX", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Get All Tokens Balance

This API gets the balance of all the tokens in your wallet (Supports Token 2022 token info 🆕)

Query Params

  • network: Solana blockchain environment (testnet/devnet/mainnet-beta)

  • wallet: Wallet address

GET /sol/v1/wallet/all_tokens

var myHeaders = new Headers();
myHeaders.append("x-api-key", "YOUR_API_KEY");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/wallet/all_tokens?network=mainnet-beta&wallet=BNZPZfmuoWFjvnPRasn6oxWF326Mq2jXv6JpY2AdcqbU", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

You can further call Tokens Get Info API to fetch detailed info of required addresses.

Get Portfolio

This request gets all the token details (fungible and non-fungible) from a wallet. (Supports Token 2022 token info 🆕)

Query Params

  • network: Solana blockchain environment (testnet/devnet/mainnet-beta)

  • wallet: Wallet address

GET /sol/v1/wallet/get_portfolio

var myHeaders = new Headers();
myHeaders.append("x-api-key", "-3iYNcRok7Gm4EMl");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/wallet/get_portfolio?network=devnet&wallet=BvzKvn6nUUAYtKu2pH3h5SbUkUNcRPQawg4bURBiojJx", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Get All Domains

This API gets all the .sol domain addresses associated with a wallet.

Query Params

  • network: Solana blockchain environment (testnet/devnet/mainnet-beta)

  • wallet: Wallet address

GET /sol/v1/wallet/get_domains

var myHeaders = new Headers();
myHeaders.append("x-api-key", "-3iYNcRok7Gm4EMl");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/wallet/get_domains?network=mainnet-beta&wallet=9hqqMGMfG44L2R1a1osDgQRWKYt4YuegfUB6rUSaXrv8", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Resolve Address

Resolves the given name account to the associated .sol domain address.

Query Params

  • network: Solana blockchain environment (testnet/devnet/mainnet-beta)

  • wallet: Wallet address

GET /sol/v1/wallet/resolve_address

var myHeaders = new Headers();
myHeaders.append("x-api-key", "-3iYNcRok7Gm4EMl");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/wallet/resolve_address?network=mainnet-beta&address=CK9rDU7Bk9SV5SEmRUakMjN87fpqTTSWq2ieojTmXJoL", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Get Transaction History (deprecated)

Get the transaction history of your wallet

Deprecated! Use Transaction History endpoint instead.

GET /sol/v1/wallet/transaction_history

Query Params:

  • network: Solana blockchain environment (testnet/devnet/mainnet-beta)

  • wallet: Wallet address

  • tx_num: (optional) How many transactions (maximum 10 transactions at a time) do you want to fetch

  • before_tx_signature: (optional) Tx signature before which X number of transactions will be fetched, in reverse order going back in time

var myHeaders = new Headers();
myHeaders.append("x-api-key", "-3iYNcRok7Gm4EMl");

var requestOptions = {
  method: 'GET',
  headers: myHeaders,
  redirect: 'follow'
};

fetch("https://api.shyft.to/sol/v1/wallet/transaction_history?network=devnet&wallet=2fmz8SuNVyxEP6QwKQs6LNaT2ATszySPEJdhUDesxktc&tx_num=2&before_tx_signature=4pbfE4HtYjYyTrPN4pAZ68oXw2XxAUeVTedMvRnEn6qNwSj2RLUWUmjoVaUEbcJuLyBYvC1Za1npyhN1zFD8RXC", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));