# 区块链开发入门02 使用币安API获取代币价格 **Published by:** [n37r09u3](https://paragraph.com/@n37r09u3/) **Published on:** 2022-05-27 **URL:** https://paragraph.com/@n37r09u3/02-api ## Content https://github.com/binance/binance-connector-nodeconst { Spot } = require('@binance/connector') const client = new Spot() client.tickerPrice('SHIBUSDT').then(response => console.log(response.data)) 更新由于现货价格接口不需要认证 所以可以省略key和secret代理问题推荐在外国主机上运行代码 本地要走sock5代理 应该要改造一下connector里的axios实例化代码https://github.com/binance/binance-connector-node/blob/54368ccfde50055cf02ae9dae883d61ff5e560a3/src/helpers/utils.js#L38具体参考 这里 ## Publication Information - [n37r09u3](https://paragraph.com/@n37r09u3/): Publication homepage - [All Posts](https://paragraph.com/@n37r09u3/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@n37r09u3): Subscribe to updates - [Twitter](https://twitter.com/N37R09U3): Follow on Twitter