Skip to main content
Version: 2.2

Get Coin transfers by block height(s)

GEThttps://mainnet-aptos-api.moralis.io/coins/transfers/blocks

Get Coin transfers from one or many block heights.

QUERY PARAMS
limitnumberrequired
The number of results to return
offsetnumber
The number of results to skip
cursorstring
The cursor to use for getting the next page
block_heightsarrayrequired
The coin types to fetch info about
No items in the array
Responses
API KEY
import Moralis from 'moralis';

try {
await Moralis.start({
apiKey: "YOUR_API_KEY"
});

const response = await Moralis.AptosApi.coins.getCoinTransfersByBlockHeights({
"limit": 5,
"network": "mainnet"
});

console.log(response);
} catch (e) {
console.error(e);
}
Response Example
{
"cursor": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHhkODUwOTQyZWY4ODExZjJhODY2NjkyYTYyMzAxMWJkZTUyYTQ2MmMxIiwiY2hhaW4iOiJldGgiLCJkaXNhYmxlVG90YWwiOiJ0cnVlIiwiYXBpS2V5SWQiOjM2NTg5LCJsaW1pdCI6MTAwLCJ0b3BpYzMiOiI9Om51bGwiLCJ0b19ibG9jayI6IjE0NjgxNTM3IiwicGFnZSI6MSwidG90YWwiOjAsIm9mZnNldCI6MSwidWMiOnRydWUsImlhdCI6MTY3MTk3ODQwNH0.XM9IN3wRJgWzSvQCy-K4Asgs_j8p9xTM1pY7UnHEhs4",
"hasNextPage": true,
"result": {
"activity_type": "0x1::coin::WithdrawEvent",
"amount": "324933484",
"block_height": "49661526",
"coin_type": "T0xa911c7236486be921f6cc9227b09afe4a4ad14d291ba1bb8a9b7c4d628759de::gegg::GEGG",
"entry_function_id_str": "0x563e8382514ccdcc0c0a83469c9262d22d0b052316c1bd67286ba42bb11d0815::AtodexSwapPoolV1::swap_exact_coi",
"event_account_address": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac",
"event_creation_number": "9",
"event_sequence_number": "59",
"is_gas_fee": "",
"is_transaction_success": true,
"owner_address": "0x9125e4054d884fdc7296b66e12c0d63a7baa0d88c77e8e784987c0a967c670ac",
"transaction_timestamp": "2022-09-17T22:03:32.000000Z",
"transaction_version": "210373856"
}
}