The official Agent OS market data API rejected my very first candlestick request.

The exact response was “Too much request weight used,” with a limit of 6000 request weight per 1 MINUTE. I waited 25 seconds and tried again; it went through. Weight is shared across the outgoing IP, so if someone else is hammering it, you might get blocked too.

In the same minute, several endpoints returned four different prices for BTCUSDT.

Spot latest trade: 82538.01. Spot 24-hour weighted average: 81865.35. USDⓈ-M contract latest price: 82490.30. Contract mark price: the 15:00 hourly candlestick opened at 82534.1 and closed at 82510.9.

Spot and contract prices differed by $48 in the same minute. Each order book had its own trades, and neither reported an error. The weighted average was $672 off; it’s weighted by 24-hour trading volume, so even today’s low of 80393.56 is factored in.

Don’t expect the contract ticker endpoint to give you the mark price—it only has three fields: price, symbol, and time. To get the mark price, you need to call markPriceKlineCandlestickData separately.

Two field-related pitfalls: prices and volumes are all strings, like 82538.01000000. Only count is an integer, so adding values directly could concatenate 12 and 34 into 1234. Candlesticks are returned as nested arrays, with 12 fixed-position elements.

According to the official line in the AMA, Agent OS currently provides access to public data. None of the endpoints I used require account permissions, and I didn’t need to configure a single API key.

My process has three steps. First, call the spot ticker. If you need a reference, add the 24-hour weighted average. Only fetch a candlestick with limit=1 when checking the pattern. If you hit -1003, wait a dozen seconds or so and retry.

#中本聪国际社区Baoluo币商资本 #币安推出BinanceIntelligence #BinanceAI #Binance