The Bitquery API offers deep insights into blockchain data across multiple chains. With it, you can extract transaction details, smart contract interactions, and wallet addresses' behavior. When paired with Pipedream, you can automate blockchain-related tasks, create triggers based on on-chain events, or integrate blockchain data into other applications or services. Analyzing trends, monitoring wallets, and real-time alerting for transactions become seamless with Bitquery on Pipedream.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
bitquery: {
type: "app",
app: "bitquery",
}
},
async run({steps, $}) {
const data = {
"query": `{
EVM(network: eth) {
Blocks(limit: { count: 10 }) {
Block {
Number
Time
}
}
}
}`,
}
return await axios($, {
method: "post",
url: `https://streaming.bitquery.io/graphql`,
headers: {
Authorization: `Bearer ${this.bitquery.$auth.oauth_access_token}`,
},
data,
})
},
})
Crypto Market Analytics Dashboard: Construct a serverless dashboard that aggregates and displays cryptocurrency market trends by leveraging Bitquery's API to fetch data, such as token price movements, volume, and liquidity information across various exchanges. Refresh the data periodically with Pipedream's scheduled workflows to keep the dashboard updated.
Wallet Transaction Monitoring: Set up a Pipedream workflow that triggers on a schedule to check a list of wallet addresses using Bitquery's API. When a new transaction is detected, process and send a notification via email, SMS, or a messaging app like Slack. This enables real-time monitoring of wallets for unusual activities or significant transfers.
Automated Trading Signals: Develop a system that uses Bitquery's API to scan blockchain networks for specific trading indicators or patterns. Connect this with a trading platform's API on Pipedream to execute trades automatically whenever the defined conditions are met, such as a sudden increase in token transfers, which may indicate market movement.
Bitquery uses OAuth authentication. When you connect your Bitquery account, Pipedream will open a popup window where you can sign into Bitquery and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Bitquery API.
Pipedream requests the following authorization scopes when you connect your account:
POST
https://oauth2.bitquery.io/oauth2/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{custom_fields.client_id}}
&
client_secret={{custom_fields.client_secret}}
&
grant_type=client_credentials
&
scope=api
POST
https://oauth2.bitquery.io/oauth2/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{custom_fields.client_id}}
&
client_secret={{custom_fields.client_secret}}
&
grant_type=client_credentials
&
scope=api