我正在尝试将JSON的“ USDT_BTC ”的“最后”值放在标签内...
CODE
Dim BitcoinPrice As String = ""
Dim json = New IO.StreamReader(DirectCast(DirectCast(Net.WebRequest.Create("https://poloniex.com/public?command=returnTicker"), Net.HttpWebRequest).GetResponse, Net.HttpWebResponse).GetResponseStream)
Dim rq As Newtonsoft.Json.Linq.JToken = Newtonsoft.Json.Linq.JObject.Parse(json.ReadToEnd)
BitCoinPrice = $"{rq.SelectToken("USDT_BTC")}" 'and value of "last"
Label1.Text = BitCoinPrice
网站
https://poloniex.com/public?command=returnTicker
JSON示例
"BTC_XRP":{"id":117,"last":"0.00001990"},
"USDT_BTC":{"id":121,"last":"11714.68222119"}, ' "last" Value
"USDT_DASH":{"id":122,"last":"736.33990743"},
答案 0 :(得分:0)
Facebook上的一个人真的很有兴趣帮助告诉我,解决办法就是将"last"
的值放在"USDT_BTC"
之后。
这样的事情:
BitCoinPrice = $"{rq.SelectToken("USDT_BTC")("last")}"