pikeway inspect
See exactly what an endpoint expects and what it costs, plus a ready-to-run pikeway run command. Free, no key needed.
Synopsis
pikeway inspect -p <provider> -e <endpoint> [-m <method>] [--json]
Description
Calls POST /v1/inspect and prints the API name, method, path and price, the description, then the path and query parameters (required ones marked *, with type, allowed values and description) and the JSON body schema if there is one. Notes from the API owner follow.
The last line is a complete pikeway run command filled in with the endpoint's example input, so you can copy it, change the values and run it. -m is added to that line only for non-GET methods.
Options
--provider, -pstringrequireddiscover (e.g. birdeye).--endpoint, -estringrequired/tvl/{protocol}) or a concrete path (/tvl/aave) works.--method, -mstringExamples
# the usual next step after discover
pikeway inspect -p birdeye -e /defi/price
# pick the POST variant of a path that also has GET
pikeway inspect -p someapi -e /reports -m POST
# a concrete path is matched against its template
pikeway inspect -p defillama -e /tvl/aave
# get just the input schema and example
pikeway inspect -p birdeye -e /defi/price --json | jq '{input, exampleInput}'Output
Birdeye (birdeye) GET /defi/price $0.001/call
Current price of a token by mint address
query parameters:
* address string Token mint address
next: pikeway run -p birdeye -e '/defi/price' -i '{"queryParams":{"address":"So11111111111111111111111111111111111111112"}}'For an endpoint with a JSON body and owner notes:
Some API (someapi) POST /reports $0.01/call
Generate a usage report
JSON body schema:
{
"type": "object",
"properties": {
"range": { "type": "string", "enum": ["7d", "30d", "90d"] }
},
"required": ["range"]
}
note: reports over 90 days can take a few minutes; use --wait
next: pikeway run -p someapi -e '/reports' -m POST -i '{"body":{"range":"30d"}}'--json
The full /v1/inspect response: input (JSON Schemas for pathParams, queryParams, body), exampleInput, price, notes, hints and, when published, responses.
{
"provider": "birdeye",
"providerName": "Birdeye",
"endpoint": "/defi/price",
"method": "GET",
"description": "Current price of a token by mint address",
"input": {
"queryParams": {
"type": "object",
"properties": { "address": { "type": "string", "description": "Token mint address" } },
"required": ["address"]
}
},
"exampleInput": { "queryParams": { "address": "So11111111111111111111111111111111111111112" } },
"price": { "type": "PER_CALL", "amount": { "value": 0.001, "currency": "USD" } },
"notes": [],
"hints": { "inspect": "…", "run": "…", "docs": "…" }
}Errors and exit codes
| Exit | Message | When |
|---|---|---|
| 2 | missing --provider | -p was not given (or given without a value). |
| 2 | missing --endpoint | -e was not given. |
| 1 | unknown provider: birdeyee | No API with that slug. |
| 1 | unknown endpoint /price on birdeye | No such path. With --json, details.available lists the endpoints that do exist. |
| 1 | cannot reach <gateway>: ECONNREFUSED | The gateway could not be reached (DNS, network, wrong PIKEWAY_API_BASE_URL). The code after the colon comes from Node. |
- Not sure of the path? Run pikeway discover first, or use
--jsonon a wrong path to get the list of valid ones.