-
Notifications
You must be signed in to change notification settings - Fork 7
Main Methods To Support
Taylor Dawson edited this page Aug 15, 2019
·
5 revisions
Method | Endpoints | Options(params) | Use Cases | Implemented | Notes |
---|---|---|---|---|---|
Addresses | |||||
address.getInformation(address [, filters]) |
/addresses/hash/information |
· hash · includePrice |
· get my balance info · get token holdings · get contract information |
× | - |
address.getMultipleBalances(addresses [, filters]) |
-/addresses/:hash/balances /addresses/balances
|
· hash · addresses |
· get ether balances for an address(es) · get token balances & prices for an address(es) |
× | if you get 1 address hit /addresses/:hash/balances endpointmaybe limit # of addresses; max 100; addresses q-param is required on the endpoint thus it will be it's own param in the method. |
addresses.getAddresses([filters]) |
/addresses |
params | · get all addresses on a given chain | × | - |
addresses.getBalance(address [, filters]) |
/addresses/:hash/account-balances/historical /addresses/:hash/account-balances/latest
|
params | · just get ether balance and metadata · get historical balance —useful for wallets |
× | uses historical endpoint if asking for past balance |
addresses.getAdoption(address [, filters]) |
/addresses/:hash/adoption |
params | · want to know if a token/dapp is getting popular | × | - |
addresses.getFunctions(address [, filters]) |
/addresses/:hash/functions |
params | getting raw internal messages-can see contract interactions | × | - |
addresses.getInternalMessages(address [, filters]) |
/addresses/:hash/internal-messages |
params | (see above) | × | same as above |
addresses.getLogs(address [, filters]) |
/addresses/:hash/logs |
params | allows for searching through logs of a contract | × | - |
addresses.getMetadata(address [, filters]) |
/addresses/:hash/metadata |
params | get network info about an address can detect which net work an address is on | × | - |
addresses.getTransactions(address [, filters]) |
/addresses/:hash/transactions |
parms | getting list of all transactions by an address | × | - |
addresses.getPendingTransactions(address [, filters]) |
/addresses/:hash/pending-transactions |
params | get all of an addresses pending transactions | × | (as many as possible- don't have 100% access to the entire pending pool) |
addresses.getTokenBalances() |
/addresses/:hash/token-balances |
params | get the historical token balances of the address | × | - |
addresses.getTokens() |
/addresses/:hash/tokens |
params | get the tokens that an address holds | × | - |
addresses.getTokenTransfers() |
/addresses/:hash/token-transfers |
params | getting the token transfers of an address instead of sifting through the logs | × | - |
addresses.getUsage() |
/addresses/:hash/usage |
params | check the popularity of a token/dapp | × | - |
Blocks | |||||
blocks.getBlock(id [, filters]) |
/blocks /blocks/:id
|
params | get details about a given block | × | - |
blocks.getBlocks([filters]) |
/blocks |
params | get a set of blocks | × | - |
blocks.getEvents(id [, filters]) |
/blocks/:id/events |
params | get all events emitted in a block | × | - |
blocks.getFunctions(id [, filters]) |
/blocks/:id/functions |
params | get all function calls within a block | × | - |
blocks.getInternalMessages(id [, filters]) |
/blocks/:id/internal-messages |
params | (see above) | × | - |
blocks.getLogs(id [, filters]) |
/blocks/:id/logs |
params | get the logs of a block | × | - |
blocks.getTokenTransfers(id [, filters]) |
/blocks/:id/token-transfers |
params | see all token transfers in the block | × | - |
blocks.getTransactions(id [, filters]) |
/blocks/:id/transactions |
params | get all of a blocks transactions | × | - |
Contracts | |||||
contracts.getDetails(hash) |
/contracts/:hash alias /contracts/:hash/sources
|
params | get detailed info about a contract | × | - |
contracts.getAbi(hash) |
/contracts/:hash/abi |
params | great for getting a contract's abi for use in a dapp | × | - |
contracts.getSecurityAudit(hash) |
/contracts/:hash/audit |
params | find out if a contract is secure | × | - |
contracts.getFunctions(hash) |
/contracts/:hash/functions |
params | (same as abi ) | × | - |
contracts.getSourceCode(hash) |
/contracts/:hash/source-code |
params | get the source code of the contract | × | (differs from Web3data.getCode() in that it returns not only bytecode but decompiled source where available) |
Market Data | |||||
market.getExchanges([filters: {indexBy: '']) |
/market/exchanges /market/pairs
|
params | want to know what we support | × | uses indexBy filter to determine data response:indexBy: pair indexBy: exchange
|
market.getOhlcvInfo() (optional see ↓↓↓) |
/market/ohlcv/information |
params | good for trading/charting | × | - |
market.getOhlcv([ pair , filters ]) |
/market/ohlcv/information /market/ohlcv/:pair/historical /market/ohlcv/:pair/latest
|
params | good for trading/charting | × | no params? just return info use historical endpoint if startDate or endDate is specified |
market.getOrders(pair [, filters]) |
/market/orders/:pair |
params | good for trading/charting | × | - |
market.getBbos(pair [, filters ]) |
/market/orders/:pair/bbo /market/orders/:pair/bbo/historical
|
params | good for trading/charting | × | use historical endpoint if startDate or endDate is specified |
market.getOrderBookUpdates(pair [, filters ]) |
/market/orders/:pair/update |
parms | good for trading/charting | × | - |
market.getAssetAddresses([ filters ]) or.. market.getTokenAddresses([ filters ])
|
/market/pairs/addresses |
params | get the address of the asset your interested in | × | - |
market.getPrices(base [, filters]) |
/market/prices/:base/historical /market/prices/:base/latest /market/prices/:base/wap/latest
|
params | get a view into asset valuation useful for trading | × | use historical endpoint if startDate or endDate is specifiedif filters: { wap: true} uses the /wap/latest endpoint |
market.getSupportedPrices([filters]) |
/market/prices/pairs |
params | helpful to know what prices we support | × | - |
market.getRankings([filters]) |
/market/rankings |
params | get tokens by different rankings | × | - |
market.getTickers([pair, filters]) |
/market/tickers/information /market/tickers/:pair/historical /market/tickers/:pair/latest
|
params | good for trading | × | use historical endpoint if startDate or endDate is specifiedno params? just return info |
market.getSupportedTickers([filters]) |
/market/tickers/information |
params | get list of supported tickers | × | - |
market.getTokenPrices(hash [, filters]) |
/market/tokens/prices/:hash/historical /market/tokens/prices/:hash/latest
|
params | get current and historical token prices | × | use historical endpoint if startDate or endDate is specified |
market.getTrades(pair [, filters]) |
/market/trades/:pair/historical |
params | can get trade data; useful for trading | × | - |
Transactions | |||||
transactions.getTransactions([hash, filters]) |
/transactions /transactions/:hash
|
params | get detailed information about hashes; can even be used to prove transaction validity | × | if hash specified then use /transactions/:hash
|
transactions.getGasPercentiles([filters]) |
/transactions/gas/percentiles |
params | useful metric for analyzing transaction data | × | - |
transactions.getGasPredictions() |
/transactions/gas/predictions |
params | know how long it will take for transaction to confirm | × | - |
transactions.getVolume([filters]) |
/transactions/volume |
params | useful metric for network/blockchain analytics | × | - |
Tokens | |||||
tokens.getHolders(hash [, filters]) |
/tokens/:hash/holders/historical /tokens/:hash/holders/latest
|
params | provides valuable insight about addresses holding the specified token | × | use historical endpoint if timeFrame is specified |
tokens.getSupplies(hash [, filters]) |
/tokens/:hash/supplies/historical /tokens/:hash/supplies/latest
|
params | see historical and latest token supplies; good for charting/trading | × | use historical endpoint if startDate or endDate is specified |
tokens.getTransfers(hash [, filters]) |
/tokens/:hash/transfers |
params | get all transfers by a token address | × | - |
tokens.getVeolcity(hash [, filters]) |
/tokens/:hash/velocity |
params | get a token's velocity; good for informed trading | × | - |
tokens.getVolume(hash [, filters]) |
/tokens/:hash/volume |
params | get a token's volume | × | - |
tokens.getRankings([filters]) |
/tokens/rankings |
params | understand the popularity of tokens | × | - |
Signatures | |||||
signatures.getSignature(hash) |
/signatures/:hash |
params | great for getting human readable names for 4byte sigs | × | - |
Security | |||||
security.getAudits([filters]) |
/security/audits |
params | programmatic access to audit data | × | - |
security.getDefinitions([filters]) |
/security/mythx/definitions |
params | understand audit data better | × | - |
security.getStats([filters]) |
/security/statistics |
params | nice to know overall audit stats | × | - |
System | |||||
system.health() |
/system/health |
none | useful to check how amberdata's system are doing | × | - |
Subscriptions |
Notes:
there's a lot of getSupported
. Maybe have a generic market.getSupported()
where on can specify: tickers
, pairs
, exchanges
? Ex.
market.getSupported(['tickers', ...])