Robinhood Trades
Bitquery exposes Robinhood trade and price data through the Trading APIs.
To query or stream data outside the Bitquery IDE, you need an API access token.
Follow the steps here: How to generate Bitquery API token ➤
Network identifier
| Field | Value | Notes |
|---|---|---|
NetworkBid | bid:robinhood | Filter to select Robinhood data (indexed and faster) |
Network | Robinhood | Filter to select Robinhood data |
Real time Trades on Robinhood
Stream real time tardes on Robinhood via a GraphQL subscription on Trading.Trades that includes details such as Trader Address, Base and Quote Currency Details, amounts, type of trade (buy or sell), market cap and transaction details.
▶️ Run in IDE
subscription {
Trading {
Trades(
where: {
Pair: {
Market: {
NetworkBid: {
is: "bid:robinhood"
}
}
}
}) {
Block {
Time
}
Trader{
Address
}
Amounts{
Base
Quote
}
AmountsInUsd{
Base
}
Pair{
Token{
Name
Symbol
Address
}
QuoteToken{
Name
Symbol
Address
}
}
Side
Supply{
FullyDilutedValuationUsd
MarketCap
}
TransactionHeader{
Hash
}
}
}
}
Historical Trades on Robinhood
Trade APIs allows user to query upto past 30 days of data using the GraphQL API.
▶️ Run in IDE
{
Trading {
Trades(
orderBy: {ascending: Block_Date}
where: {
Block: {
Time: {
since_relative: {weeks_ago: 3}
till_relative: {weeks_ago: 1}
}
}
Pair: {
Market: {
NetworkBid: {
is: "bid:robinhood"
}
}
}
}) {
Block {
Time
}
Trader{
Address
}
Amounts{
Base
Quote
}
AmountsInUsd{
Base
}
Pair{
Token{
Name
Symbol
Address
}
QuoteToken{
Name
Symbol
Address
}
}
Side
Supply{
FullyDilutedValuationUsd
MarketCap
}
TransactionHeader{
Hash
}
}
}
}
Real Time Trades for a specific token
Using this GrpahQL stream you can get real time trades for a specific token with details such as trader address, token details, marketcap, FDV and transaction hash.
▶️ Run in IDE
subscription {
Trading {
Trades(
where: {
Pair: {
Token: {
Address: {
is: "0x9077841e155faaf4e4e89470822c2187eeef7777"
}
}
Market: {
NetworkBid: {
is: "bid:robinhood"
}
}
}
}) {
Block {
Time
}
Trader{
Address
}
Amounts{
Base
Quote
}
AmountsInUsd{
Base
}
Pair{
Token{
Name
Symbol
Address
}
QuoteToken{
Name
Symbol
Address
}
}
Side
Supply{
FullyDilutedValuationUsd
MarketCap
}
TransactionHeader{
Hash
}
}
}
}
Trades by a Trader
Using this GrpahQL API endpoint you can get token trades by a trader with details such as trade amount, trade type, token details, marketcap, FDV and transaction hash.
▶️ Run in IDE
{
Trading {
Trades(
where: {
Trader:{
Address:{
is: "0x39d83c23dbf34fa574b9afbb0c0e364bdfd97099"
}
}
Pair: {
Market: {
NetworkBid: {
is: "bid:robinhood"
}
}
}
}) {
Block {
Time
}
Trader{
Address
}
Amounts{
Base
Quote
}
AmountsInUsd{
Base
}
Pair{
Token{
Name
Symbol
Address
}
QuoteToken{
Name
Symbol
Address
}
}
Side
Supply{
FullyDilutedValuationUsd
MarketCap
}
TransactionHeader{
Hash
}
}
}
}
Latest Price of a Token on Robinhood
Get the latest USD normalised price of a token on Robinhood network using this API endpoint using Trading.Tokens.
If you want to monitor price for a particular pool, we suggest usage of Trading.Pairs instead of Trading.Tokens where you could specify the pool address.
▶️ Run in IDE
{
Trading {
Tokens(
where: {Token: {Address: {is: "0x9077841e155faaf4e4e89470822c2187eeef7777"}, NetworkBid: {is: "bid:robinhood"}}, Interval: {Time: {Duration: {eq: 1}}}}
orderBy: {descending: Interval_Time_End}
limit: {count: 1}
) {
latest_price: Price {
Ohlc {
Close
}
}
}
}
}
Latest Price of a Token for a Liquidity Pool
This API endpoint retrieves the latest price of a token for a particular token pair or liquidity pool using Token.Pairs cube.
▶️ Run in IDE
{
Trading {
Pairs(
where: {
Pool: {
Address:{
is: "0xbbaefcfcd7b92ed0df1a3eec22a21ba6beb0b52b"
}
}
Token: {
Address: {
is: "0x9077841e155faaf4e4e89470822c2187eeef7777"
},
NetworkBid: {is: "bid:robinhood"}},
Interval: {Time: {Duration: {eq: 1}}}
}
orderBy: {descending: Interval_Time_End}
limit: {count: 1}
) {
Pool{
Address
}
latest_price: Price {
Ohlc {
Close
}
}
}
}
}
Real Time OHLCV stream for a Pair on Robinhood
This GraphQL stream for 1 second OHLCV streams the USD normalised OHLC/K-line data for a token pair, and also contains info such as interval start and end time, marketcap, volume and token details for both base and quote tokens.
▶️ Run in IDE
subscription{
Trading {
Pairs(
where: {
Pool: {
Address:{
is: "0xbbaefcfcd7b92ed0df1a3eec22a21ba6beb0b52b"
}
}
Token: {
Address: {
is: "0x9077841e155faaf4e4e89470822c2187eeef7777"
},
NetworkBid: {is: "bid:robinhood"}},
Interval: {Time: {Duration: {eq: 1}}}
}
) {
Interval{
Time{
Start
End
}
}
Price {
Ohlc {
Open
High
Low
Close
}
}
Token{
Name
Symbol
Address
}
QuoteToken{
Name
Symbol
Address
}
Volume{
Base
Quote
Usd
}
Supply{
MarketCap
}
}
}
}