First of all, thanks for making the package and writing up the blog post! Really helpful tutorial.
I run into an issue when I get to the "Last 1000 Trades" section. Running the command from the blog post yields the following:
julia> trades, pages = CoinbasePro.trades("BTC-USD")
ERROR: InexactError: convert(Dates.Decimal3, 981)
Stacktrace:
[1] tryparsenext
@ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Dates/src/io.jl:153 [inlined]
[2] tryparsenext
@ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Dates/src/io.jl:41 [inlined]
[3] macro expansion
@ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Dates/src/parse.jl:64 [inlined]
[4] tryparsenext_core(str::SubString{String}, pos::Int64, len::Int64, df::Dates.DateFormat{Symbol("yyyy-mm-ddTHH:MM:SS.sss"), Tuple{Dates.DatePart{'y'}, Dates.Delim{Char, 1}, Dates.DatePart{'m'}, Dates.Delim{Char, 1}, Dates.DatePart{'d'}, Dates.Delim{Char, 1}, Dates.DatePart{'H'}, Dates.Delim{Char, 1}, Dates.DatePart{'M'}, Dates.Delim{Char, 1}, Dates.DatePart{'S'}, Dates.Delim{Char, 1}, Dates.DatePart{'s'}}}, raise::Bool)
@ Dates /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Dates/src/parse.jl:38
[5] macro expansion
@ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Dates/src/parse.jl:150 [inlined]
[6] tryparsenext_internal
@ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Dates/src/parse.jl:125 [inlined]
[7] parse(::Type{Dates.DateTime}, str::SubString{String}, df::Dates.DateFormat{Symbol("yyyy-mm-ddTHH:MM:SS.sss"), Tuple{Dates.DatePart{'y'}, Dates.Delim{Char, 1}, Dates.DatePart{'m'}, Dates.Delim{Char, 1}, Dates.DatePart{'d'}, Dates.Delim{Char, 1}, Dates.DatePart{'H'}, Dates.Delim{Char, 1}, Dates.DatePart{'M'}, Dates.Delim{Char, 1}, Dates.DatePart{'S'}, Dates.Delim{Char, 1}, Dates.DatePart{'s'}}})
@ Dates /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Dates/src/parse.jl:282
[8] DateTime
@ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Dates/src/io.jl:483 [inlined]
[9] _broadcast_getindex_evalf
@ ./broadcast.jl:648 [inlined]
[10] _broadcast_getindex
@ ./broadcast.jl:621 [inlined]
[11] getindex
@ ./broadcast.jl:575 [inlined]
[12] macro expansion
@ ./broadcast.jl:984 [inlined]
[13] macro expansion
@ ./simdloop.jl:77 [inlined]
[14] copyto!
@ ./broadcast.jl:983 [inlined]
[15] copyto!
@ ./broadcast.jl:936 [inlined]
[16] copy
@ ./broadcast.jl:908 [inlined]
[17] materialize(bc::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, Type{Dates.DateTime}, Tuple{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, typeof(chop), Tuple{Vector{String}}}, Base.RefValue{Dates.DateFormat{Symbol("yyyy-mm-ddTHH:MM:SS.sss"), Tuple{Dates.DatePart{'y'}, Dates.Delim{Char, 1}, Dates.DatePart{'m'}, Dates.Delim{Char, 1}, Dates.DatePart{'d'}, Dates.Delim{Char, 1}, Dates.DatePart{'H'}, Dates.Delim{Char, 1}, Dates.DatePart{'M'}, Dates.Delim{Char, 1}, Dates.DatePart{'S'}, Dates.Delim{Char, 1}, Dates.DatePart{'s'}}}}}})
@ Base.Broadcast ./broadcast.jl:883
[18] _get_trades(url::String)
@ CoinbasePro ~/.julia/packages/CoinbasePro/LqTjF/src/trades.jl:9
[19] trades(ccy::String)
@ CoinbasePro ~/.julia/packages/CoinbasePro/LqTjF/src/trades.jl:18
[20] top-level scope
@ REPL[1]:1
julia> versioninfo()
Julia Version 1.6.1
Commit 6aaedecc44 (2021-04-23 05:59 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-11.0.1 (ORCJIT, icelake-client)
Environment:
JULIA_EDITOR = "/home/yenson/.vscode-server/bin/c3f126316369cd610563c75b1b1725e0679adfb3/node"
JULIA_NUM_THREADS =
I might go and debug it later bug just wanted to give you a heads up in case you know a quick way to fix it. Thanks!