binance-api - how to get close price and trade volume for last minute? - binance-api-client

I went through several binance APIs and all examples I saw seem pretty complex to what I need. I would like to get each minute close price and trade volume for last minute. I there an example that I could use please? By strean or HTTP GET? Thank you very much!

Related

Grafana - Alert based on a minimum of requests

I hope you can help me.
What I have is some metric data I am collecting. I want to send out an alert, when I reach a specific error-rate on these metrics.
To make clear, my data looks something like this:
Timestamp
value (the runtime of a query)
state (error, success)
api-endpoint called
I have a grafana-Board doing some calculations, drops out something linke this:
error-rate
api-endpoint
number of calls made to the api endpoint
Fine for now - as I can read out on my grafana, I am able to send some error-messages/warnings, if the error-rate is too high. Works like a charm. But now comes the point:
If the first two (e.g.) calls to a specific api fail, I will instantly receive an alarm send by my grafana. I do not wan't that!
Is it possible - and if: how? - to alert me ONLY if this specific request was executed at least 5 times? It is no problem if this is a generic alert like "hey, something is wrong!" - but I need to figure out if the request triggering the alarm with 50-100% error-Rate was at least executed a specific amount of time before alarming.
It has to be done based on tags/fields, I do not want to add a single query for all of my 35+ APIs (number growing).
Any Idea anybody?
Using Grafana 8.0
Using InfluxDb 1.8 (with Flux enabled)
Just to make clear, if everyone ever want's to do the same: FluxQL is king - you can use filter functionality in there and only base data on datasets where value count is greater than X.
Yes: FluxQL is damn hot. I love it since a few month.

Two questions of TradeStation charts

I am evaluating which one to choose, TWS from IB or TS. TWS has a demo account but TS does not. I have two questions about TS stock chart.
premarket data in charts start from 4am, or later? TWS starts from 4am. I know TS only allows trades after 8am. I am just wondering if premarket data in chart also starts late.
when premarket data is displayed along with regular trading hour data, HOURLY candle is aligned with 9am or 9:30am? TWS has hourly candle aligned with 9am not market opening time. I honestly don't like it. I am just wondering if TS does the same thing.
If anyone can answer me these two questions, I would be really appreciated!
Thanks,
Jay
You can set when you want TS to show you data from, in terms of sessions; if it's there, they'll find it. So yes, I can for example set my TS chart to show 'premarket' AAPL data from 0300 (or really any other time). I can't trade it before the exchange opens though, as that would be an OTC/ off-exchange trade which you have to be an institution to do.
Candles are aligned with 0930, but that doesn't matter; it can be changed in settings, also though when backtesting, you should use LIBB (Look Intra Bar).
Hope this helps! I strongly recommend you take a close look at MultiCharts too, using IQFeed data.
Also remember, all these systems are buggy as all hell. Managing workflow with them is as much about learning and overcoming their eccentricities, as it is doing the work.

Bittrex API - delay in candle (OHLC) data

(originally asked in bitcoin.stackexchange but didn't get much traction there ... )
I'm noticing that the Bittrex API (both v1.1 and v2.0) have a 3 to 4 minute delay when getting data, i.e. GetLatestTick: https://bittrex.com/api/v2.0/pub/market/GetLatestTick?marketName=BTC-NEO&tickInterval=hour
So if you make a request say at 8:00PM, it will not bring the 7:00 to 8:00PM candle (OHLC) data until 8:03PM, some times 8:04PM ...
I thought about constructing my own candles querying the API every few seconds with /getticker - but for a few cryptos it will get lengthy and might get banned for the amount of requests per second ...
Contacted Bittrex, but never had a response back.
Anyone knows any other method to get candle data sooner?
Thanks!
ClueDex is what I'm using to get up to the second candle OHLCV data. They claim to be between 2 and four minutes faster than the Bittrex API. That matters a lot when you're trying to integrate the data into a trading platform or create a high frequency trading bot, particularly with the Parabolic SAR metric, which is a high confidence trading signal.
Try Enigmas Catalyst - you get minute data from Bitfinex, Bittrex and Poloniex for backtesting and livetrading
https://enigma.co/

Facebook Marketing insights Grouped By Day

How is possible to get insights grouped by days?
Means get one row per day with all the statistics.
I see that I can use "hourly_stats_aggregated_by_audience_time_zone" in "breakdowns" but I dont know exactly what is the result.
I need one record each day depending from the level (for instance is I choose level=campaign) I need to have campaign_id, campaign_name, day, spent
Is is possible?
Thanks, Alex.
The parameter that I'm looking for is "time_increment" equals 1.
Here is the docs https://developers.facebook.com/docs/marketing-api/insights/v2.5
Usually, facebook insight URLs are compiled like
https://graph.facebook.com/v2.5/<object>/insights/<metric>/<period>
in your example something like
175527252532294/insights/page_impressions/day?breakdowns=/hourly_stats_aggregated_by_audience_time_zone
where <object> is your page/ad/post/app/... ID
You may try it first over here: Graph Explorer

Yahoo Weather API current conditions

I am trying to get the current weather conditions for a certain location, but for some reason I always get the conditions for a semi-random day/time (more or less past week). I am using this query: https://query.yahooapis.com/v1/public/yql?q=select%20item.condition%20from%20weather.forecast%20where%20woeid%20%3D%20639660%20AND%20u%3D%22c%22&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=
Even trying out the example query on their website doesn't work for me. When I click on "Current conditions for San Diego, CA" I get the same, random results. Is there any way to get the current conditions?
I am seeing the same thing. It has to be on Yahoo's side. Unfortunately it looks like their support page is down too. Returned a 404
I've also notice the random ( 1 day up to 2 wks) of old data being transmitted
http://xml.weather.yahoo.com/forecastrss/55364_f.xml It seems to change about every 30 seconds