Token Transfer

Generate unsigned transactions for SPL token transfers

Request

const response = await fetch(
  'https://arrow-api.yatori.io/v1/token-transfer',
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer <insert API key here>'
    },
    body: JSON.stringify({
      from_address: 'G8RtxPyG2pdrAhrNRMgg7Hia8imCofdCYxvyWiNG14hx',
      to_address: 'gmDexz3AyHdgCyHrbYUrGUvodYE953oGKmywiNzgtGK',
      token_mint_address: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
      amount: '1000'
    })
  }
)

Response

response.json
{
  "data": [
    1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 6, 9, 224, 198, 132, 241, 33, 60, 165, 69, 165, 137, 249, 56, 14, 189, 194, 57, 107, 230, 202, 36, 126, 45, 186, 41, 133, 233, 0, 160, 254, 107, 105, 131, 114, 209, 25, 121, 139, 14, 220, 248, 44, 176, 117, 159, 14, 254, 214, 6, 151, 36, 118, 109, 236, 203, 32, 120, 192, 61, 6, 179, 173, 45, 218, 45, 127, 137, 237, 247, 130, 56, 74, 134, 204, 67, 191, 123, 166, 91, 79, 41, 161, 140, 76, 123, 201, 155, 45, 37, 32, 35, 97, 191, 124, 46, 38, 180, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 0, 1, 12, 2, 0, 0, 0, 160, 134, 1, 0, 0, 0, 0, 0
  ],
  "status": "Token transfer tx created successfully"
}

Endpoint

POST
https://arrow-api.yatori.io/v1/token-transfer

Headers

Auth Bearer Token

Include your Arrow API key as a Bearer token in the Authorization header

stringrequired

Parameters

from_address

The wallet address sending the tokens

stringrequired

to_address

The wallet address receiving the tokens

stringrequired

token_mint_address

The mint address of the SPL token being transferred

stringrequired

amount

The amount to transfer in base units

stringrequired

fee_des (optional)

The destination address for the fee

string addressoptional

fee_amount (optional)

The fee amount in base units

base unit stringoptional