Skip to main content
POST
/
v1
/
spl
/
transfer
cURL
curl --request POST \
  --url https://payments.magicblock.app/v1/spl/transfer \
  --header 'Content-Type: application/json' \
  --data '
{
  "from": "3rXKwQ1kpjBd5tdcco32qsvqUh1BnZjcYnS5kYrP7AYE",
  "to": "Bt9oNR5cCtnfuMmXgWELd6q5i974PdEMQDUE55nBC57L",
  "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "amount": 1000000,
  "visibility": "private",
  "fromBalance": "base",
  "toBalance": "base",
  "initIfMissing": true,
  "initAtasIfMissing": true,
  "initVaultIfMissing": true,
  "memo": "Order #1042",
  "minDelayMs": "0",
  "maxDelayMs": "0",
  "split": 1
}
'
{
  "kind": "deposit",
  "version": "legacy",
  "transactionBase64": "<string>",
  "sendTo": "base",
  "recentBlockhash": "<string>",
  "lastValidBlockHeight": 123,
  "instructionCount": 1,
  "requiredSigners": [
    "So11111111111111111111111111111111111111112"
  ],
  "validator": "So11111111111111111111111111111111111111112"
}

Body

application/json

Transfer request

from
string
required
Example:

"So11111111111111111111111111111111111111112"

to
string
required
Example:

"So11111111111111111111111111111111111111112"

mint
string
required
Example:

"So11111111111111111111111111111111111111112"

amount
integer
required

Base-unit amount as an integer JSON value with minimum 1.

Required range: x >= 1
Example:

1000000

visibility
enum<string>
required
Available options:
public,
private
fromBalance
enum<string>
required
Available options:
base,
ephemeral
toBalance
enum<string>
required
Available options:
base,
ephemeral
cluster

Optional. Use mainnet for BASE_RPC_URL and EPHEMERAL_RPC_URL, devnet for BASE_DEVNET_RPC_URL and EPHEMERAL_DEVNET_RPC_URL, or provide a custom http(s) RPC URL to override the base RPC while keeping the configured ephemeral RPC.

Available options:
mainnet,
devnet
Example:

"mainnet"

validator
string

Optional. When this transfer route needs a validator and none is provided, the API resolves it from the selected ephemeral RPC via getIdentity.

Example:

"MAS1Dt9qreoRMQ14YQuhg8UTZMMzDdKhmkZMECCzk57"

initIfMissing
boolean
initAtasIfMissing
boolean
initVaultIfMissing
boolean
memo
string

Optional. Appends a final Memo Program instruction with this UTF-8 message.

Example:

"Order #1042"

minDelayMs
string

Optional. Private transfer only. Defaults to 0.

Pattern: ^\d+$
Example:

"0"

maxDelayMs
string

Optional. Private transfer only. Defaults to 0 when omitted, or to minDelayMs when minDelayMs is set.

Pattern: ^\d+$
Example:

"0"

split
integer

Optional. Private transfer only. Defaults to 1. Must be between 1 and 15.

Required range: x <= 15
Example:

1

Response

Unsigned serialized transaction

kind
enum<string>
required
Available options:
deposit,
withdraw,
transfer
version
enum<string>
required
Available options:
legacy
transactionBase64
string
required
sendTo
enum<string>
required
Available options:
base,
ephemeral
recentBlockhash
string
required
lastValidBlockHeight
integer
required
instructionCount
integer
required
Required range: x >= 0
requiredSigners
string[]
required
validator
string
Example:

"So11111111111111111111111111111111111111112"