File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name = " CoinbaseProExchange"
22uuid = " 06c3450d-869c-4596-88b4-6f9fb82f72bd"
33authors = [" Vikas Negi <vikas.negi10@gmail.com>" ]
4- version = " 1.1.0 "
4+ version = " 1.1.1 "
55
66[deps ]
77Base64 = " 2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Original file line number Diff line number Diff line change @@ -104,19 +104,17 @@ end
104104
105105function get_url (pair:: String , endpoint:: String )
106106
107- url = " "
108- if endpoint == " 24hr stats"
109- url = URL * " /products/$(pair) /stats "
110- elseif endpoint == " product info "
111- url = URL * " /products/ $(pair) "
112- elseif endpoint == " product ticker "
113- url = URL * " /products/ $(pair) /ticker "
114- elseif occursin ( " order book " , endpoint)
115- level = parse (Int64, endpoint[ end ])
116- url = URL * " /products/ $(pair) /book?level= $(level) "
107+ url_dict = Dict (
108+ " 24hr stats" => URL * " /products/ $(pair) /stats " ,
109+ " product info " => URL * " /products/$(pair) " ,
110+ " product ticker " => URL * " /products/ $(pair) /ticker " ,
111+ )
112+
113+ if occursin ( " order book " , endpoint)
114+ return URL * " /products/ $(pair) /book?level= $( parse (Int64 , endpoint[ end ])) "
115+ else
116+ return url_dict[endpoint]
117117 end
118-
119- return url
120118end
121119
122120function get_product_data (pair:: String , endpoint:: String )
You can’t perform that action at this time.
0 commit comments