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.
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.
kind parameter to get transaction history of a certain type or a combination of types.kind parameter, all transaction types will be returned.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{to}, current time or the latest block number will be used.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.
presets is a required parameter.size is optional. (Min = 1, Max = 1000, Default = 100)size=100) when size=0size=1000) when given a value higher than the maximum value.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'
{- "items": [
- {
- "transferType": "mt",
- "transaction": {
- "from": "0xbdfaeffb231ed4ef4600a8be4f5aa02ba4821708",
- "fee": "0x661625fab1200",
- "transactionHash": "0x6826275ccdec83711277de86c773d9ce987fb8bcd7edf26b623d3117b1d01b52",
- "blockNumber": 5312085,
- "typeInt": 48,
- "timestamp": 1607993827,
- "value": "0x0",
- "feePayer": "",
- "feeRatio": 0
}, - "contract": {
- "address": "0xda781766c4ca2d6f35dab8c5d26ad3d3021e69c8"
}, - "operator": "0xbdfaeffb231ed4ef4600a8be4f5aa02ba4821708",
- "from": "0xbdfaeffb231ed4ef4600a8be4f5aa02ba4821708",
- "to": "0x9c7fe1c0af1cba4d341b46ac624464e3462b863b",
- "ids": [
- "0x1"
], - "values": [
- "0x1c2"
]
}, - {
- "transferType": "nft",
- "transaction": {
- "from": "0xbdfaeffb231ed4ef4600a8be4f5aa02ba4821708",
- "fee": "0x70aafcc4b0e00",
- "transactionHash": "0x4341fe79a5b69847a284e20aea3d1fdb3377724661bf224f38e02d34b2940c96",
- "blockNumber": 5312080,
- "typeInt": 48,
- "timestamp": 1607993827,
- "value": "0x0",
- "feePayer": "",
- "feeRatio": 0
}, - "contract": {
- "address": "0x67faa05618e00cde1e3d9092b90c0876855c39e4",
- "name": "KASNFT",
- "symbol": "KNFT"
}, - "from": "0xbdfaeffb231ed4ef4600a8be4f5aa02ba4821708",
- "to": "0x9c7fe1c0af1cba4d341b46ac624464e3462b863b",
- "tokenId": "0x1"
}, - {
- "transferType": "ft",
- "transaction": {
- "from": "0xbdfaeffb231ed4ef4600a8be4f5aa02ba4821708",
- "fee": "0x4fe85ad649c00",
- "transactionHash": "0x196862e12efc8d4ea83a792d9bafbcc5d87b21805c7fe4ae76b8e3d7fac9e3f3",
- "blockNumber": 5312079,
- "typeInt": 48,
- "timestamp": 1607993827,
- "value": "0x0",
- "feePayer": "",
- "feeRatio": 0
}, - "contract": {
- "address": "0xf2a8ab5b6c14f33a3b470ac7505712c8665e81d3",
- "name": "KASFT",
- "symbol": "KFT",
- "decimals": 18
}, - "from": "0xbdfaeffb231ed4ef4600a8be4f5aa02ba4821708",
- "to": "0x9c7fe1c0af1cba4d341b46ac624464e3462b863b",
- "value": "0x15e",
- "formattedValue": "0.00000000000000035"
}, - {
- "transferType": "klay",
- "from": "0xbdfaeffb231ed4ef4600a8be4f5aa02ba4821708",
- "fee": "0x1dd7c1681d000",
- "status": 1,
- "to": "0x9c7fe1c0af1cba4d341b46ac624464e3462b863b",
- "transactionHash": "0xe5ba3d97ed0e2b69e2e0da7aa1abdc22a17b3f79141f67f4784b5ce5433736c7",
- "transactionIndex": 0,
- "blockNumber": 5312080,
- "typeInt": 8,
- "timestamp": 1607993821,
- "value": "0xde0b6b3a7640000",
- "feePayer": "",
- "feeRatio": 0
}
], - "cursor": "KGvdzQDxL2AYZzAMk1dLK6g9OrJN02G7aqwaNpWkPJlL07V51MZ8xmBOR17GPp1KDXE5bKhYnv93XgGbrz6EdAKeoQ2Y4Dq3peQV45vDPWmoXxlYB8wbEVPXBb9a7Z6O"
}