Query received and sent transfers of tokens

Query all transaction history. Transaction history is divided into KAIA (=KLAY) Transfer (KlayTransfer), FT Transfer (FtTransfer), NFT Transfer (NftTransfer), and MT Transfer (MtTransfer). The term klay remains as before for compatibility.

KlayTransfer in FT/NFT/MT transactions

For transfers of FTs, NFTs, or MTs, KlayTransfer history will also be included in the query result. This is because FT/NFT/MT transfers are essentially execution of a corresponding contract function, and the response for the transfer includes KlayTransfer, which is equivalent to the transaction for sending KLAY. Since most transactions that execute contract functions do not usually send KAIA(=KLAY), the value of KlayTransfer that transfered NT, NFT, and MT may be zero. By using the exclude-zero-klay=true query, KlayTransfer can be excluded.

Transaction type

  • You can choose KAIA(=KLAY), FT, NFT or MT by setting kind parameter to get transaction history of a certain type or a combination of types.
  • If you don't set the kind parameter, all transaction types will be returned.


Date range

  • range is queried in the form of range={from},{to}
  • {from} and {to} will be considered Unix time in the case of a decimal number, and block number in the case of a hexadecimal number
  • When there is no value for {to}, current time or the latest block number will be used.
  • You can retrieve the transaction history from the past 6 months maximum. (for both Unix time and block number)


Preset

Preset is a collection of EOA and FT, NFT and MT contracts. You can use it to repetitively retrieve transaction history for certain accounts quickly and easily.

  • The parameter presets is a required parameter.
  • Preset needs to be created on KAS Console in advance.
  • You can check your Preset ID on KAS Console. For more information please visit Preset.


Size

  • The query parameter size is optional. (Min = 1, Max = 1000, Default = 100)
  • Returns an error when given a negative number
  • Uses default value (size=100) when size=0
  • Uses the maximum value (size=1000) when given a value higher than the maximum value.
Request
Security:
query Parameters
kind
string

(csv) Types to include ["klay", "ft", "nft", "mt"], query all types when not specified. The term klay remains as before for compatibility.

Example: kind=klay,ft,nft,mt
range
string

Set range (block number or unix time)

Example: range=0x1,0x2
size
integer <int64>

Number of maximum response items (min=1, max=1000, default=100)

Example: size=100
cursor
string

Response offset

exclude-zero-klay
string

Exclude transfers of 0 KAIA (=KLAY) if true (default=false). The term klay remains as before for compatibility.

Example: exclude-zero-klay=true
presets
required
string

(csv) Preset IDs to be used for query, Preset ID can be found on KAS Console

Example: presets=65,68
header Parameters
x-chain-id
required
string

Kaia Network Chain ID (1001 or 8217)

Responses
200
400
404
get/v2/transfer
Request samples
curl -i -X GET \
  -u <username>:<password> \
  'https://th-api.klaytnapi.com/v2/transfer?kind=string&range=string&size=0&cursor=string&exclude-zero-klay=string&presets=string' \
  -H 'x-chain-id: string'
Response samples
application/json
{
  • "items": [
    ],
  • "cursor": "KGvdzQDxL2AYZzAMk1dLK6g9OrJN02G7aqwaNpWkPJlL07V51MZ8xmBOR17GPp1KDXE5bKhYnv93XgGbrz6EdAKeoQ2Y4Dq3peQV45vDPWmoXxlYB8wbEVPXBb9a7Z6O"
}