Skip to content
6 changes: 3 additions & 3 deletions docs/blockchain/robinhood/bags-fm-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ The query counterpart to the stream above — the most recent Bags trades across
```

:::tip Query ⇄ Stream
Every query on this page can be turned into a live stream — switch the operation type from `query` to `subscription` in the Bitquery IDE (and drop `orderBy`/`limit`, which don't apply to subscriptions).
Every query on this page can be turned into a live stream — switch the operation type from `query` to `subscription` in the Bitquery IDE (and drop `orderBy`/`limit`, which don't apply to subscriptions). Over WebSocket, connect to `wss://streaming.bitquery.io/graphql?token=YOUR_TOKEN` with the `graphql-transport-ws` subprotocol — see [WebSocket authentication](/docs/authorization/websocket/).
:::

---
Expand Down Expand Up @@ -349,7 +349,7 @@ Scope trades to a single Bags token with `Pair.Token.Address`. This example uses

## Trades by a Trader on Bags

Track all Bags trades made by a specific wallet by filtering on `Trader.Address`.
Track all Bags trades made by a specific wallet by filtering on `Trader.Address`. Replace the example with any wallet address.

```graphql
{
Expand All @@ -358,7 +358,7 @@ Track all Bags trades made by a specific wallet by filtering on `Trader.Address`
limit: {count: 50}
orderBy: {descending: Block_Time}
where: {
Trader: {Address: {is: "0x00a60b9760a4aa1a2fd6388b5cb6295f4c90cee0"}}
Trader: {Address: {is: "0x80f173cff2e585d1156f9a96b6195939ac1ba643"}}
Pair: {Market: {ProtocolFamily: {is: "Bags"}}}
}
) {
Expand Down
44 changes: 44 additions & 0 deletions docs/blockchain/robinhood/flap-sh-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ keywords:
- Flap.sh tax paid event
- Flap.sh VanityTokenCreated
- Flap.sh MsgSent social event
- Flap.sh TokenBought event
- Flap.sh TokenSold event
- Flap.sh raw bonding curve trades
---
# Flap.sh API on Robinhood

Expand Down Expand Up @@ -251,6 +254,47 @@ Beyond buy/sell trades, Flap.sh emits lifecycle events across several contracts
Every query below can be run as a real-time stream — change the operation type to `subscription` in the Bitquery IDE.
:::

### Raw bonding-curve trades (`TokenBought` / `TokenSold`)

The bonding-curve engine emits its own decoded trade events on the Flap.sh contract with on-chain-exact values. `TokenBought` arguments: `ts`, `token`, `buyer`, `amount`, `eth`, `fee`, `postPrice` — swap the signature name to `TokenSold` for sells. Use these when you need the exact fee and post-trade curve price; use `Trading.Trades` (above) for decimal-normalized, USD-priced trades.

```graphql
{
EVM(network: robinhood) {
Events(
limit: {count: 20}
orderBy: {descending: Block_Time}
where: {
Log: {Signature: {Name: {is: "TokenBought"}}}
LogHeader: {Address: {is: "0x26605f322f7ff986f381bb9a6e3f5dab0beaeb09"}}
}
) {
Block {
Time
}
Transaction {
Hash
From
}
Arguments {
Name
Value {
... on EVM_ABI_Address_Value_Arg {
address
}
... on EVM_ABI_BigInt_Value_Arg {
bigInteger
}
... on EVM_ABI_Integer_Value_Arg {
integer
}
}
}
}
}
}
```

### Token graduations (`LaunchedToDEX`)

The most important lifecycle signal: a token completed its bonding curve and was **launched to a DEX**. The event returns the new `pool` address (use it with the [Robinhood Trades API](/docs/blockchain/robinhood/robinhood-trades) to follow post-graduation trading), the migrated token `amount`, and the `eth` seeded into the pool.
Expand Down
Loading
Loading