Closed r-raymond closed 6 years ago
I have pushed some changes to hopefully handle this better. Could you try install version 0.0.7 and let me know if this is working now. I dont have access to the API due to country restrictions so cant test unfortunately.
Hi, thanks for the quick response and the the awesome work on you python wrapper!
If I leave from_date and to_date to the default (None
) I still get the same errors. If I supply datetime.utcnow() for both, I get
{'TIMESTAMP': '2018-03-10 16:13:19.622078', 'code': 'INVALID_REQUEST_DATA', 'message': 'Invalid fromDate. The fromDate must be a valid Iso8601 time.\r\nInvalid toDate. The toDate must be a valid Iso8601 time.', 'Latency': 0.156715}
so it seems that it does not recognize the strings as valid times. The API says that they want ISO 8601 in GMT. Maybe sending with / without TZ info and or milliseconds does the trick? I've tried some combinations but without any luck so far.
have you installed the updated version via pip? also you could supply datetime.datetime.utcnow().isoformat() which should handle transforming the datetime to isoformat.
I have (on version 0.0.7). You mean supply to form_date and to_date, or change your code?
If you supply the from_date and to_date in .isoformat() rather than datetime format I think it should work.
Unfortunately that does not help. I'm still getting the same errors.
Ok, after reverse engineering the R
package they provide I was able to figure out a date format they accept: YYYY-MM-DD
nothing else. I did try quite a lot of different versions to include times, but didn't get any to work. Ultimately I'm fine with just specifying the date.
What format do you pass as a "since" parameter in api.market_data.get_odds(since=...)? I tried lots but nothing works. API reference wants in64.
yesterday received "482352841" as value for "last"
When calling the
get_bets
routine of thebetting
endpoint without any arguments, I getWhen setting
from_date
andto_date
todatetime.utcnow()
I get