Skip to content

Instantly share code, notes, and snippets.

@evanVtatum
evanVtatum / Custodial multi-wallet: Batch transfer of all tokens on Polygon
Last active July 29, 2021 13:11
Custodial multi-wallet: Batch transfer of all tokens on Polygon
curl --location --request POST 'https://api-eu1.tatum.io/v3/blockchain/sc/custodial/transfer/batch' \
--header 'Content-Type: application/json' \
--header 'x-api-key: YOUR_API_KEY' \
--data-raw '{
"chain": "MATIC",
"contractType": [0,1,2,3],
"tokenId": ["0","100","1","0"],
"amount": ["0.001","0","1","0.009"],
"tokenAddress": [
"0x2d7882bedcbfddce29ba99965dd3cdf7fcb10a1e",
@evanVtatum
evanVtatum / Generate NFT Marketplace Polygon
Created August 23, 2021 14:56
Generate NFT Marketplace Polygon
curl --location --request POST 'https://api-eu1.tatum.io/v3/blockchain/marketplace/listing' \
--header 'Content-Type: application/json' \
--header 'x-api-key: YOUR_API_KEY' \
--data-raw '{
"feeRecipient": "0x8cb76aEd9C5e336ef961265c6079C14e9cD3D2eA",
"marketplaceFee": 250,
"chain": "MATIC",
"fromPrivateKey": "0x37b091fc4ce46a56da643f021254612551dbe0944679a6e09cb5724d3085c9ab"
}'
@evanVtatum
evanVtatum / Create fixed-price NFT listing on Polygon
Created August 23, 2021 15:04
Create fixed-price NFT listing on Polygon
curl --location --request POST 'https://api-eu1.tatum.io/v3/blockchain/marketplace/listing' \
--header 'Content-Type: application/json' \
--header 'x-api-key: YOUR_API_KEY' \
--data-raw '{
"contractAddress": "0x4153B909f55B0Ec43c11e980dF09b853477D9F79",
"nftAddress": "0x6d8eae641416b8b79e0fb3a92b17448cfff02b11",
"tokenId": "12",
"listingId": "1",
"isErc721": true,
"price": "0.001",
@evanVtatum
evanVtatum / Buy an asset on NFT marketplace
Created August 23, 2021 15:13
Buy an asset on NFT marketplace
curl --location --request POST 'https://api-eu1.tatum.io/v3/blockchain/marketplace/listing' \
--header 'Content-Type: application/json' \
--header 'x-api-key: YOUR_API_KEY' \
--data-raw '{
"contractAddress": "0x4153B909f55B0Ec43c11e980dF09b853477D9F79",
"listingId": "1200",
"amount": "0.002",
"chain": "MATIC",
"fromPrivateKey": "0xf09110a0aae3dddba3d722c6c629fb08082963d8ed38afaf25cfce084c22e3d2"
}'
@evanVtatum
evanVtatum / Deploy NF(royal)T Celo
Created August 26, 2021 07:38
Deploy NF(royal)T Celo
curl — location — request POST ‘https://api-eu1.tatum.io/v3/nft/deploy' \
— header ‘x-api-key: YOUR_API_KEY’ \
— header ‘Content-Type: application/json’ \
— data-raw ‘{
“symbol”: “COLLECTIBLE”,
“name”: “CollectibleToken”,
“chain”: “CELO”,
“fromPrivateKey”: “0x4874827a55d87f2309c55b835af509e3427aa4d52321eeb49a2b93b5c0f8edfb”,
“feeCurrency”: “CUSD”
}’
@evanVtatum
evanVtatum / Mint NF(royal)T Celo
Created August 26, 2021 07:42
Mint NF(royal)T Celo
curl - location - request POST 'https://api-eu1.tatum.io/v3/nft/mint' \
- header 'x-api-key: YOUR_API_KEY' \
- header 'Content-Type: application/json' \
- data-raw '{
"tokenId": "1",
"to": "0x8cb76aed9c5e336ef961265c6079c14e9cd3d2ea",
"chain": "CELO",
"contractAddress": "0xd2A6B389eBE69208636B20b2abAcFC1eE0C3fF57","cashbackValues": ["1"],
"authorAddresses": ["0x8cb76aed9c5e336ef961265c6079c14e9cd3d2ea"],"url": "https://my_token_data.com",
"fromPrivateKey": "0x4874827a55d87f2309c55b835af509e3427aa4d52321eeb49a2b93b5c0f8edfb",
@evanVtatum
evanVtatum / Transfer NF(royal)T Celo
Created August 26, 2021 07:43
Transfer NF(royal)T Celo
curl - location - request POST 'https://api-eu1.tatum.io/v3/nft/transaction' \- header 'x-api-key: YOUR_API_KEY' \
- header 'Content-Type: application/json' \
- data-raw '{
"tokenId": "1",
"chain": "CELO",
"value": "1",
"to": "0xfb99F8aE9b70A0C8Cd96aE665BBaf85A7E01a2ef",
"contractAddress": "0xd2A6B389eBE69208636B20b2abAcFC1eE0C3fF57","fromPrivateKey": "0x4874827a55d87f2309c55b835af509e3427aa4d52321eeb49a2b93b5c0f8edfb",
"feeCurrency": "CUSD"
}'
curl --request GET \
--url 'https://api-eu1.tatum.io/v3/bitcoin/wallet?mnemonic=SOME_STRING_VALUE' \
--header 'x-api-key: REPLACE_KEY_VALUE'
@evanVtatum
evanVtatum / Create virtual account
Created September 2, 2021 10:17
Create virtual account
curl --request POST \
--url https://api-eu1.tatum.io/v3/ledger/account \
--header 'content-type: application/json' \
--header 'x-api-key: REPLACE_KEY_VALUE' \
--data '{"currency":"BTC","xpub":"xpub6EsCk1uU6cJzqvP9CdsTiJwT2rF748YkPnhv5Qo8q44DG7nn2vbyt48YRsNSUYS44jFCW9gwvD9kLQu9AuqXpTpM1c5hgg9PsuBLdeNncid","customer":{"accountingCurrency":"USD","customerCountry":"US","externalId":"123654","providerCountry":"US"},"compliant":false,"accountCode":"AC_1011_B","accountingCurrency":"USD","accountNumber":"123456"}'
curl --request POST \
--url 'https://api-eu1.tatum.io/v3/offchain/account/{id}/address?index=2' \
--header 'x-api-key: REPLACE_KEY_VALUE'