API List
The list of available apis to integrate with spotonchain
General API
search
Description: search target, it can be prefix name, address, txn
Method: GET
URI: /openapi/search
Request:
required string target
Reply:
required array of object matched_list:
required SearchTargetCategory category
optional string name
optional string logo_url
// for token
optional float price
optional float percent_change_24h
// for entity
optional uint64 id
optional uint32 count
optional array of string address_types
// for address
optional string address
optional string address_type
// for txn
optional uint32 chain_id
optional string txn_hash
Signal API
get_latest_signals
Description: get latest signals
Method: GET
URI: /openapi/signals/get_latest_signals
Request:
required string api_key
optional string lang
optional uint32 last_publish_time
optional uint32 limit
Reply:
required uint32 total_signal
required array of object latest_signals:
required uint64 signal_id
required string title
required string description
required string content
required OnchainSignalType signal_type
required object txn_data_details
required array of object token_amounts
required string token
required decimal amount
optional array of object address_list:
required string address
required string logo_url
required string external link
optional array of object txn_list:
required string from_address
required string from_logo_url
required string to_address
required string to_logo_url
required string external_link
required array of string media_data
required array of object tags:
required OnChainSignalTagType tag_type
required string tag
required OnChainSignalStatus status
required uint32 publish_time
required uint32 update_time
optional object graph_info:
optional uint64 graph_id
optional string graph_thumbnail_url
optional string title
optional string description
optional uint32 sync_time optional OnChainSignalPriority priority
optional uint32 is_auto_generated
optional uint32 is_trending
Smart Trader API
get_top_active_tokens
Description: get top active tokens
Method: GET
URI: /openapi/smart_trader/get_top_active_tokens
Request:
required string api_key
Reply:
required array of object top_bought_tokens:
required string token
required decimal value # in usd
required array of object top_sold_tokens:
required string token
required decimal value # in usd
get_latest_smart_money_flow
Description: get the latest smart money flow
Method: GET
URI: /openapi/smart_trader/get_latest_smart_money_flow
Request:
required string api_key
optional string lang
optional string token # if no token indicate, show all
optional uint32 limit # max 100
Reply:
optional decimal total_net_flow
required array of (timestamp, price) price_data
required array of (timestamp, volume) volume_data
required array of object items:
required uint32 chain_id
required string txn_hash
required string txn_link
required uint32 txn_ts
optional uint64 entity_id
required string address
optional OnchainLabelAddressType address_type
optional string name
optional string logo
required decimal amount_in_usd
required string txn_type # SEND, RECEIVE, SWAP …
required token => object tokens:
optional decimal in_amount
optional decimal out_amount
get_fresh_money_flow
Description: get the latest fresh money flow
Method: GET
URI: /openapi/smart_trader/get_fresh_money_flow
Request:
required string api_key
optional string lang
optional string token # if no token indicate, show all
Reply: optional decimal total_value
required array of (timestamp, volume) volume_data
required array of (timestamp, price) price_data
required array of object items:
required uint32 chain_id
required string txn_hash
required string txn_link
required uint32 txn_ts
optional uint64 entity_id
required string address
optional string name
optional string logo
required decimal amount_in_usd
required decimal avg_price
required uint32 txn_ts
optional decimal percent_change
required string txn_type # SEND, RECEIVE, SWAP …
required token => object tokens:
optional decimal in_amount
optional decimal out_amount
Address API
count_transaction
Description: count the number of transactions, if the number of transactions is larger than 10000, the return value is just an estimated number.
Method: GET
URI: /openapi/address/count_transaction
Request:
required string address
optional string tokens # separated by comma
optional uint32 from_ts
Reply:
required uint32 count
get_transactions
Description: Get the address transactions
Method: GET
URI: /openapi/address/get_transactions
Request:
required string address
optional string tokens # separated by comma
optional uint32 from_ts
optional uint32 min_amount_usd
optional OnchainTxnSortType sort_type: default SORT_BY_TIME_DESC
optional uint32 page_index
optional uint32 item_per_page: default 50
Reply:
required uint32 total_item
required uint32 total_page
required array of object transactions:
required uint32 chain_id
required string txn_hash
required string txn_link
required uint32 create_ts
required string from_address
optional OnchainLabelAddressType from_address_type
optional string from_name
optional string from_logo
required string to_address
optional OnchainLabelAddressType to_address_type
optional string to_name
optional string to_logo
required decimal amount_in_usd
required string txn_type
required token => object tokens:
optional decimal in_amount
optional decimal out_amount
get_balances
Description: Get the address balances
Method: GET
URI: /openapi/address/get_balances
Request:
required string address
Reply:
required token => object token_balances
required string token
required string note
required array of object balances
required uint32 chain_id
required decimal amount
required decimal amount_usd
Entity API
count_transaction
Description: count the number of transactions, if the number of transactions is larger than 10000, the return value is just an estimated number.
Method: GET
URI: /openapi/entity/count_transaction
Request:
required uint64 entity_id
optional string tokens # separated by comma
optional uint32 from_ts
Reply:
required uint32 count
get_addresses
Description: Get addresses under the entity
Method: GET
URI: /openapi/entity/get_addresses
Request:
required uint64 entity_id
Reply:
required array of object label_wallets
required string address
required OnchainLabelAddressType address_type
required string name
optional string logo_url
optional string link_url
get_balances
Description: Get the entity balances
Method: GET
URI: /openapi/entity/get_balances
Request:
required string entity_id
Reply:
required token => object token_balances
required string token
required string note
required array of object balances
required uint32 chain_id
required decimal amount
required decimal amount_usd
Last updated