打造一款虚拟币交易分析软件

资讯 2024-07-13 阅读:47 评论:0
  由于各大虚拟币交易平台更多地显示自己平台上的虚拟币交易信息,如果想同时看不同平台上的虚拟币交易情况时,就要打开很多页面而且需要不停地切换页面,操作非常不方便,于是就想着做一款工具,能实时显示当前不同虚拟币交易所的价格方便操作。As t...

  由于各大虚拟币交易平台更多地显示自己平台上的虚拟币交易信息,如果想同时看不同平台上的虚拟币交易情况时,就要打开很多页面而且需要不停地切换页面,操作非常不方便,于是就想着做一款工具,能实时显示当前不同虚拟币交易所的价格方便操作。

As the virtual currency trading platforms show more information about virtual currency transactions on their own platforms, when looking at virtual currency transactions on different platforms at the same time, many pages are opened and require constant page switching, which is extremely unwieldy, and the idea is to work as a tool to show in real time the price ease of the different virtual currency exchanges that are currently taking place.

  开始的计划是,分别调用自己感兴趣的平台提供的API,以获取当前不同币种的当前价格,但是在进行编程的时候,遇到一些困难:

The initial plan was to use the API provided by a platform of interest to obtain current prices in different current currencies, but some difficulties were encountered in programming:

  1、获取速度问题:比如当需要获取比特币在不同平台上的价格信息时,就要分别访问各个平台的API,想要获取5个交易平台的比特币价格时,就要分别获取5次,当如果增加币种,比如莱特币,以太坊等时,访问的次数就会成倍增长,一个简单的公式:访问次数(s)=平台数(n) × 币种数(m),这样效率非常低下;

1. The question of speed of access: for example, when it is necessary to obtain price information for Bitcoin on different platforms, it is necessary to visit the API of each platform separately, five times when it is necessary to obtain the price of bitcoin for each of the five trading platforms, and when the number of visits is multiplied, e.g., when the currency is increased, e.g., Leitco, in Taiku, etc., a simple formula: number of visits (s) = number of platforms (n) x currency (m), which is very inefficient;

  2、数据格式问题:不同平台的API,返回的数据格式类型也是有很大区别的,当统计数据时就会因为数据格式不统一而显得非常凌乱,处理起来相当麻烦;

2. Data format issues: API from different platforms, the type of data format returned is also very different, and when statistics are not harmonized, they are very confusing and cumbersome to process;

  3、法币类型不一致:因为不同国家的发行的货币类型不一样,美国发行美元,日本发行日元,中国发行人民币,获取到的价格是以不同货币类型的价格,这里就为了便于观察需要将这些不同国家交易所的价格进行一个此时兑换人民币汇率的转换,也不是很方便。

3. The type of French currency is inconsistent: because different countries issue different types of currency, the United States dollar, Japan yen and China renminbi, the price obtained is in different currency types, and it is not convenient to observe the need for a conversion of the prices of these different national exchanges into the renminbi at this time.

  

 

  所以就想着能不能找到哪一家交易平台已经把所有的平台的价格做了一个汇总,这样我只需访问这一个交易所的网站,我就能获取到所有的交易所不同币种的价格,对比分析了很多家,发现仅有几家交易所可以观察不同平台的价格:币看、sosobtc、比特儿。

So I was wondering if I could find a trading platform where the prices of all the platforms had been aggregated, so that I could access all the exchanges'websites so that I could get prices in the different currencies of all the exchanges, compare them with many others, and find that only a few exchanges can see the prices of the different platforms: currency, sosobtc, Bitelle.

  1、首先是币看,这家交易所虽然提供了方便好用的API,但是收录的币种太少,只有几款主流币,很多山寨币没有收录,比如:比特股,狗狗等,所以不考虑。

First and foremost, the exchange offers easy-to-use API, but it receives too few currencies, only a few mainstream ones, many of which are unrecorded, such as bit shares, dogs, etc., and so on.

  2、sosobtc的API使用起来非常不方便,只有javascript的API,而且收录的平台和币种也是参差不齐,也不考虑。

The API of Sosobtc is very difficult to use, with only the API of Javascript, and the platforms and currencies recorded are uneven and unconsidered.

  3、接着是比特儿,比特儿的手机APP有一个全球行情的按钮,非常方便,如下图,而且它还帮你按照当前兑换人民币的汇率把价格换算好了,那么直接取来就能用,而且在同一网站上,数据格式也是同一规格,处理起来就相当方便了。

Three, followed by Bitelle, Bitelle's mobile phone APP has a global flow button, which is very convenient, as shown below, and it also helps you convert prices at the current RMB exchange rate, so that they can be used directly and, on the same website, the data format is the same specification, which is easily processed.

  但是遇到难题了,比特儿官方并没有提供比特儿这个获取全球行情的接口,在官网上也没有这样的一个全球行情页面供我爬取,只有在手机APP上才有全球行情的按钮,无法用wireshark、burpsuite等工具抓包分析,那可不可以抓取手机的数据呢,之前没有试过抓手机的数据,首先想到的方法是:下一个360免费wifi,开启WiFi让手机连接,这样手机的流量就会经过PC的网卡,我们就可以用wireshark等工具抓取到这些数据用来分析,谁知道这些流量都经过了360wifi的防窃听处理,根本获取不到可用的数据,这个方案行不通,纠结了很久觉得这样的方案不可行,正想回到起点用各个平台API的本办法来分别获取各币种的价格,忽然灵光一闪,可不可以用fiddler来抓取手机流量呢,之前没有试过fiddler,只是听说过这么一款软件可以抓手机的数据包,怀着做实验的心态下好fiddler,至于怎么搭建抓包环境,我搜到一个教程,里面说的很详细:https://jingyan.baidu.com/article/03b2f78c7b6bb05ea237aed2.html,然后就成功抓到包了!各个币种以及不同平台的数据都整整齐齐排布好了,这种方法是可行的!!!然后用python模拟数据头header添加上cookie,post请求就能获取到数据,实验成功!!!

But the problem has come up with the following: the next 360 free wifi, the use of WiFi to connect the mobile phone, the use of PC web cards, the use of wresark and other tools to get the data for analysis, the fact that there is only a global punctuation button on the mobile phone APP, the inability to grab data using tools such as wresark, burpsuite and so on, the possibility of extracting data from mobile phones, the first idea is that the next 360 free wifi, the use of WiFi to connect the cell phone, the flow of the cell phone will go through PC web cards, the use of wresark and so on, the data can be retrieved for analysis.

  获取到想要的数据了,命令行界面看起来很吃力,不方便使用,所以用pyqt5来做GUI可视化界面,成果如下(可以按照差价率排序):

Having obtained the desired data, the command line interface appeared to be exhausting and not easy to use, so pyqt5 was used as the GUI visual interface, with the following results (to be sorted according to the difference rate):

这样看起来简单明了了……

It seems to be simple and simple.

.

.

.

.

.

.

.

然而……

And yet...

 

 

 

   (/=_=)/~ ┴┴

 

文字格式和图片示例

注册有任何问题请添加 微信:MVIP619 拉你进入群

弹窗与图片大小一致 文章转载注明

分享:

扫一扫在手机阅读、分享本文

发表评论
热门文章
  • 以太坊区块链浏览器的搭建

    以太坊区块链浏览器的搭建
    环境;Ubuntu 首先需要下载git 参考链接:?http://www.360bchain.com/article/156.html??Environment; Ubuntu first needs to download git reference link: ˂a rel="noformlow" href="http://www.360bchai.com/article/156.html"? http://www.360bchai.com/article/156.htm...
  • 百度元宇宙希壤app官方下载

    百度元宇宙希壤app官方下载
    希壤元宇宙是一款非常好玩的休闲手游,这款游戏采用了元宇宙的游戏概念,超级自由的游戏玩法,在这里没有什么标准限定,你可以自由的在这里进行着一切你想做的事情,游戏比较的休闲和放松,没有什么操作难度,感兴趣的小伙伴们可以来007游戏网下载这款非常有趣的希壤元宇宙吧!˂a href=http://m.yx007.com/key/xxsy" target="_blank" , a game that uses the concept of meta-cosm, super-free p...
  • 【CoinCentral 合作內容】加密貨幣 Decred 正式推出 2018 發展路段線圖

    【CoinCentral 合作內容】加密貨幣 Decred 正式推出 2018 發展路段線圖
    早些時候,加密貨幣Decred發表了一篇博客文章,概述了他們2018年的正式發展路線圖。Earlier, encrypt currency Decred published a blog article outlining their official road map for development in 2018.在這個路線圖中,團隊在為他們制定營銷宣傳之前,明確地表明他們於建立和發布可交付物品的成果,同時將他們的營銷集中在項目的核心組成部分。Decred團隊正在研究一些...
  • 跨接在两个网络间的语音记录仪设计

    跨接在两个网络间的语音记录仪设计
      摘  要: 设计了语音记录仪。该语音记录仪桥接在通信设备之间,同时提供3种桥接接口:以太网接口,支持在IP通信方式下的各通话组的直通及录音功能;二线接口,支持模拟二线方式下的直通及录音功能;音频接口,支持模拟音频方式下的直通及录音功能。同时话音记录仪提供FTP服务器,可以通过局域网对语音记录仪保存的语音文件进行下载和管理。此外,该设备支持语音回放功能。 extracts & nbsp; to : The voice record...
  • 元宇宙概念股有哪些 元宇宙概念股一览表

    元宇宙概念股有哪些 元宇宙概念股一览表
    元宇宙概念股排行精选 元宇宙概念股一览表(2022/11/08),下文就随小蔡来简单的了解一下吧。The contours of the meta-cosmology unit are in the list of the meta-cosmological concept units (2022/11/08), so let's get to the bottom of this with Little Choi. 元宇宙概念股龙头有:The contou...
标签列表