Skip to content

Commit

Permalink
migrate old data api
Browse files Browse the repository at this point in the history
  • Loading branch information
juraj.bacovcin committed Feb 5, 2024
1 parent 889a9ea commit 760b76b
Show file tree
Hide file tree
Showing 13 changed files with 1,931 additions and 0 deletions.
38 changes: 38 additions & 0 deletions categories/blockchain_data/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,44 @@ paths:
$ref: "categories/blockchain_data/operations/defi.yml#/paths/~1v3~1data~1blocks"
/v3/data/blocks/latest:
$ref: "categories/blockchain_data/operations/defi.yml#/paths/~1v3~1data~1blocks~1latest"

# Data API (old)
/v3/data/collections:
get:
$ref: categories/blockchain_data/paths/v3_data_collections_get.yml
/v3/data/metadata:
get:
$ref: categories/blockchain_data/paths/v3_data_metadata_get.yml
/v3/data/balances:
get:
$ref: categories/blockchain_data/paths/v3_data_balances_get.yml
/v3/data/owners:
get:
$ref: categories/blockchain_data/paths/v3_data_owners_get.yml
/v3/data/owners/address:
get:
$ref: categories/blockchain_data/paths/v3_data_owners_address_get.yml
/v3/data/transactions:
get:
$ref: categories/blockchain_data/paths/v3_data_transactions_get.yml
/v3/data/transactions/hash:
get:
$ref: categories/blockchain_data/paths/v3_data_transactions_hash_get.yml
/v3/data/events:
get:
$ref: categories/blockchain_data/paths/v3_data_events_get.yml
/v3/data/blocks:
get:
$ref: categories/blockchain_data/paths/v3_data_blocks_get.yml
/v3/data/blocks/latest:
get:
$ref: categories/blockchain_data/paths/v3_data_blocks_latest_get.yml
/v3/data/tokens:
get:
$ref: categories/blockchain_data/paths/v3_data_tokens_get.yml
/v3/data/utxos:
get:
$ref: categories/blockchain_data/paths/v3_data_utxos_get.yml

servers:
- url: https://api.tatum.io/
182 changes: 182 additions & 0 deletions categories/blockchain_data/paths/v3_data_balances_get.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
description: '<p><b>50 credits per API call</b></p>
<p>Get balances of fungible tokens (ERC-20), NFTs (ERC-721 and ERC-1155) or multitokens
(ERC-1155 only) for a specific wallet address on the following blockchains:</p>
<ul>
<li>Celo - celo / celo-testnet</li>
<li>Ethereum - ethereum / ethereum-sepolia</li>
<li>BNB (Binance) Smart Chain - bsc / bsc-testnet</li>
<li>Polygon - polygon / polygon-mumbai</li>
<li>Tezos - tezos-mainnet</li>
<li>Horizen EON - eon-mainnet</li>
<li>Chiliz - chiliz-mainnet</li>
</ul>
<p>To get started:</p>
<ul>
<li>Provide a chain name and comma-separated list of addresses. Our API will return
balances of each token along with further information such as its type, id, and
more.</li>
<li>Aside from relevant information about each token and its balance, the response
also contains metadata (they can, however, be excluded by setting <code>excludeMetadata</code>
to <code>true</code>).</li>
<li>If not specified, the API returns balances for all supported types of tokens
(fungible tokens, nft, multitokens), but you can also choose to filter specific
<code>tokenTypes</code>.</li>
<li>For Tezos blockchain, the API returns balance of any tokens including native
token (XTZ) for specified wallet addresses. Following query parameters won''t have
any effect on filtering data <code>excludeMetadata</code>.</li>
</ul>
'
operationId: GetBalances
parameters:
- description: The blockchain to work with.
in: query
name: chain
required: true
schema:
$ref: '../../../components/migrated.yml#/components/schemas/ChainEnumExtended'
- description: 'The blockchain public wallet addresses.
It is possible to enter list of up to 10 addresses as a comma separated string.
'
in: query
name: addresses
required: true
schema:
type: string
description: Wallet address
example: 0x80d8bac9a6901698b3749fe336bbd1385c1f98f2,0xAe680Ed83baF08a8028118Bd19859F8a0E744cc6
- description: 'The option to select only specific token types.
It is possible to enter list of multiple types as a comma separated string.
Use fungible (ERC-20), nft (includes ERC-721 and ERC-1155) or multitoken (ERC-1155
only).
'
in: query
name: tokenTypes
schema:
type: string
example: nft,multitoken
enum:
- nft
- multitoken
- fungible
- description: The option to exclude metadata from the response.
in: query
name: excludeMetadata
schema:
$ref: '../../../components/migrated.yml#/components/schemas/ExcludeMetadata'
- description: The number of items per page (default is 50).
in: query
name: pageSize
schema:
$ref: '../../../components/migrated.yml#/components/schemas/PageSize'
- description: The offset to obtain next page of the data.
in: query
name: offset
schema:
$ref: '../../../components/migrated.yml#/components/schemas/Offset'
responses:
'200':
content:
application/json:
schema:
type: object
properties:
result:
type: array
items:
$ref: '../../../components/migrated.yml#/components/schemas/BalanceItem'
description: List of all balances for all selected tokens.
example:
- chain: ethereum-mainnet
address: '0xae680ed83baf08a8028118bd19859f8a0e744cc6'
balance: '283333333333333333333'
tokenAddress: '0x45dd18c5e0fa701abff449f6542aa53e258710b4'
lastUpdatedBlockNumber: 14792747
type: fungible
- chain: ethereum-mainnet
address: '0xae680ed83baf08a8028118bd19859f8a0e744cc6'
balance: '8690000000000000000'
tokenAddress: '0x090f21a84a0e9674c1828aca1db69ec8ae1454e8'
lastUpdatedBlockNumber: 15204015
type: fungible
- chain: ethereum-mainnet
address: '0xae680ed83baf08a8028118bd19859f8a0e744cc6'
balance: '1'
tokenAddress: '0xa58b5224e2fd94020cb2837231b2b0e4247301a6'
lastUpdatedBlockNumber: 15326272
type: multitoken
tokenId: '2605'
metadataURI: https://www.cryptovoxels.com/c/1/2605
metadata:
url: https://www.cryptovoxels.com/c/1/2605
name: Link Marine Helmet
description: Chainlink Marine Helmet, give Sergey Nazarov your love.
prevPage:
type: string
description: Cursor pagination, used to get previous page of results
(work in progress, not used right now).
example: ''
nextPage:
type: string
description: Cursor pagination, used to get next page of results (work
in progress, not used right now).
example: ''
description: OK
'400':
content:
application/json:
schema:
$ref: '../../../components/migrated.yml#/components/schemas/Error400'
description: Bad Request. Validation failed for the given object in the HTTP Body
or Request parameters.
'401':
content:
application/json:
schema:
oneOf:
- $ref: '../../../components/migrated.yml#/components/schemas/Error401NotActive'
- $ref: '../../../components/migrated.yml#/components/schemas/Error401Invalid'
description: Unauthorized. Not valid or inactive subscription key present in the
HTTP Header.
'403':
description: Forbidden. The request is authenticated, but it is not possible to
required perform operation due to logical error or invalid permissions.
content:
application/json:
schema:
$ref: '../../../components/migrated.yml#/components/schemas/Error403'
'500':
content:
application/json:
schema:
$ref: '../../../components/migrated.yml#/components/schemas/Error500'
description: Internal server error. There was an error on the server during the
processing of the request.
security:
- X-API-Key: []
x-codeSamples: []
summary: Get balances of addresses
tags:
- Data API (old)
146 changes: 146 additions & 0 deletions categories/blockchain_data/paths/v3_data_blocks_get.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
description: '<p><b>10 credits per API call</b></p>
<p>Get information about blocks (when they were added, how many NFTs and events
were ingested and list of transaction hashes that were processed within them) on
the following blockchains:</p>
<ul>
<li>Celo - celo / celo-testnet</li>
<li>Ethereum - ethereum / ethereum-sepolia</li>
<li>BNB (Binance) Smart Chain - bsc / bsc-testnet</li>
<li>Polygon - polygon / polygon-mumbai</li>
<li>Horizen EON - eon-mainnet</li>
<li>Chiliz - chiliz-mainnet</li>
</ul>
<p>To get started, provide a chain and specify one of the filters listed below (combination
of these filters is not allowed):</p>
<ul>
<li>List of block numbers separated by comma</li>
<li>Range of block numbers</li>
<li>Date range when blocks were processed</li>
</ul>
'
operationId: GetBlocks
parameters:
- description: The blockchain to work with.
in: query
name: chain
required: true
schema:
$ref: '../../../components/migrated.yml#/components/schemas/ChainEnum'
- description: List of block numbers, separated by comma.
in: query
name: blockIds
schema:
type: array
items:
type: integer
example: 1,2,4,400
minimum: 0
- description: Range of block numbers. Both blockFrom and blockTo need to be specified.
in: query
name: blockFrom
schema:
$ref: '../../../components/migrated.yml#/components/schemas/BlockNumber'
- description: Range of block numbers. Both blockFrom and blockTo need to be specified.
in: query
name: blockTo
schema:
$ref: '../../../components/migrated.yml#/components/schemas/BlockNumber'
- description: Date range when blocks were processed. Both timeFrom and timeTo need
to be specified.
in: query
name: timeFrom
schema:
type: string
example: 2022-12-24T00:10
- description: Date range when blocks were processed. Both timeFrom and timeTo need
to be specified.
in: query
name: timeTo
schema:
type: string
example: 2022-12-24T00:20
- description: The number of items per page (default is 50).
in: query
name: pageSize
schema:
$ref: '../../../components/migrated.yml#/components/schemas/PageSize'
- description: The offset to obtain next page of the data.
in: query
name: offset
schema:
$ref: '../../../components/migrated.yml#/components/schemas/Offset'
responses:
'200':
content:
application/json:
schema:
type: array
items:
$ref: '../../../components/migrated.yml#/components/schemas/BlockItem'
description: List of blocks added to a blockchain.
example:
- blockNumber: 10
blockTimestamp: 1598671520000
hash: '0xec1a2d906f34e1981b2b1a15dbe5e10cf640e8b4b27dc056ebb65c0409b5a9af'
eventIngestedSize: 0
nftIngestedSize: 0
- blockNumber: 11
blockTimestamp: 1598671540000
hash: '0xa78e7a9c6910fea66a981389735e0c652f1625905c6e0dca08d3f5c1694b7cc4'
eventIngestedSize: 1
nftIngestedSize: 0
txHashes:
- '0x19eaae1f7bdd28605f4175d7e87c9de68431bf76e85a262e268252a84bfc3984'
description: OK
'400':
content:
application/json:
schema:
$ref: '../../../components/migrated.yml#/components/schemas/Error400'
description: Bad Request. Validation failed for the given object in the HTTP Body
or Request parameters.
'401':
content:
application/json:
schema:
oneOf:
- $ref: '../../../components/migrated.yml#/components/schemas/Error401NotActive'
- $ref: '../../../components/migrated.yml#/components/schemas/Error401Invalid'
description: Unauthorized. Not valid or inactive subscription key present in the
HTTP Header.
'403':
description: Forbidden. The request is authenticated, but it is not possible to
required perform operation due to logical error or invalid permissions.
content:
application/json:
schema:
$ref: '../../../components/migrated.yml#/components/schemas/Error403'
'500':
content:
application/json:
schema:
$ref: '../../../components/migrated.yml#/components/schemas/Error500'
description: Internal server error. There was an error on the server during the
processing of the request.
security:
- X-API-Key: []
x-codeSamples: []
summary: Get specified blocks
tags:
- Data API (old)
Loading

0 comments on commit 760b76b

Please sign in to comment.