Callback APIs
Get real time updates on addresses of your choice
Last updated
Was this helpful?
Get real time updates on addresses of your choice
Last updated
Was this helpful?
Checkout structure for different type of transaction actions
Returns a list of all the callbacks registered for a user
Create a callback for addresses you are interested to monitor. Once this API is triggered, callbacks are created asynchronously and may take a minute to start sending data to the specified callback URL.
network: Solana blockchain environment (devnet / mainnet-beta).
addresses: Array of addresses to watch.
callback_url: The URL on which transaction callbacks should be sent to.
enable_raw (optional): Includes raw transaction information along with parsed data.
enable_events (optional): Includes parsed anchor events emitted in the transaction if an IDL is provided.
type (optional): DISCORD, CALLBACK or ACCOUNT.
Use the following API to stop listening on existing addresses. Once this API is triggered, callbacks are removed asynchronously and may take a minute to stop.
id: ID of the registered callback by user. Can be obtained from list callbacks API
Use the following API to pause created callbacks. Once this API is triggered, callbacks are paused asynchronously and may take a minute to pause. Pausing callbacks is the smart way to maximize your credits. With no credits being consumed during the pause, you can save big.
id: ID of the registered callback by the user. Can be obtained from list callbacks API
Use the following API to resume paused callbacks. Once this API is triggered, callbacks are resumed asynchronously and may take a minute to resume. Upon resuming callbacks, please be aware that credit consumption will resume accordingly.
id: ID of the registered callback by the user. Can be obtained from list callbacks API
id: ID of the callback which has be updated. Can be found from list callbacks API.
addresses: (optional) Array of public keys of accounts which should be watched.
callback_url: (optional) New callback url.
enable_raw (optional): Option to include raw transaction information along with parsed data in callback.
enable_events (optional): Option to include parsed anchor events emitted in the transaction.
encoding (optional): Option to change encoding format of account callbacks. Ignored if callback type is not ACCOUNT
Once you add addresses to your callback, we start monitoring them instantly, without any latency.
id: (string) Callback id which has to be updated
addresses: (Array<string>) List of addresses which should be added in existing callback
Removing addresses from a callback can take few seconds to reflect.
id: (String) Callback Id which has to be updated
addresses: (Array<string>) List of addresses which should be removed from the callback
Every callback will be a Shyft parsed transaction along with some additional values of raw transaction information and account details. This callback is sent to the specified callback url as a POST request.
Callbacks include x-api-key
header which is the users api key so that a user can verify that the request is being sent from Shyft's server directly.
Callbacks contain extra raw field which includes raw transaction info if enable_raw
option is provided while creating the callback
Callbacks contains accounts field which includes list of accounts which might have been changed in the transaction. The accounts data contains the following fields: account address as base58 encoded string , account owner as base58 encoded string, lamports balance as number and custom account data as hex formatted string.
Below is a sample transaction callback for SOL transfer between 2 accounts.
events (optional): Array of Transaction types you are interested in. Default is any
. Valid values for events are given .
encoding (optional): RAW and PARSED. Applicable for account callbacks only. When PARSED
is specified for programs whose IDL is present on T, the callback will contain parsed information as per the IDL. If IDL is not present it will send base64 encoded data. In case of RAW
the account data will always be in base64 format. Default is RAW
.
events: (optional) Array of valid events to watch for. Valid values for events are given
Checkout response structure for all supported transaction types