According to the documentation, the Account daytrade_count should be a string that contains an int, but the JSON that gets downloaded when I GET the account information, is actually just a regular int. This tripped me up temporarily when I switched over the v2 API, but now I got it working again. I don't know if this is a bug in the behavior or inaccurate or misleading information in the documentation. It was causing my code to throw an Exception until I changed that property to be an Int instead of a String (I am writing all my code in Kotlin by the way). Here is an example of some JSON I retrieved from the API (I removed most of it to emphasize the daytrade_count portion).
The documentation should be fixed. It should be an int in my opinion. String is only useful for floating point numbers to preserve precision. Can you submit a pull request?
According to the documentation, the Account daytrade_count should be a string that contains an int, but the JSON that gets downloaded when I GET the account information, is actually just a regular int. This tripped me up temporarily when I switched over the v2 API, but now I got it working again. I don't know if this is a bug in the behavior or inaccurate or misleading information in the documentation. It was causing my code to throw an Exception until I changed that property to be an Int instead of a String (I am writing all my code in Kotlin by the way). Here is an example of some JSON I retrieved from the API (I removed most of it to emphasize the daytrade_count portion).
{"sma":"0","daytrade_count":0}