probe-gate
Demonstrates fetching a minimal order book showing only the best bid and ask prices for quick spread analysis.
curl 'https://api.exchange.coinbase.com/products/BTC-USD/book?level=1'
import requests
resp = requests.get(
"https://api.exchange.coinbase.com/products/BTC-USD/book",
params={
'level': '1',
},
)
data = resp.json()
import zingu_apis
api = zingu_apis.api("coinbase-pro")
result = api.fetch("products/{product_id}/book", level=1)
for item in result:
print(item)
const resp = await fetch("https://api.exchange.coinbase.com/products/BTC-USD/book?level=1");
const data = await resp.json();