[Python] Get real-time futures data

I started playing futures last month. Although mobile phones and computers have clients to view, it is always a little inconvenient during working hours, red, green and green flickering.

For leek speculation, you only need to look at a number. So, a thing like a picture was created.

a6cd9d931bf82f04d4c4493c773fd60b.png

Everything is simple, save as much as you can, say goodbye to red, red, green, and green.

Real-time data of multiple varieties can be obtained at the same time. At least I think the data is relatively real-time, and the error will not exceed 2 seconds. 2 seconds does not affect anything for leeks, and the client's network delay starts at 5 seconds.

As for multiple varieties, you only need to get the id of the variety (pocket precious metal), and fill the id into  the pocket id.txt

1e372fd0aa158db879cacaf22613db0d.png

The format is:

id1,id2,id3,id4,id5,id6

There is a comma in English state in the middle, and no comma at the end, for example:

42627,13,42851,42852,42853,12,105

At present, I only pay attention to the following varieties, and the known id correspondences are as follows:

沪银2308:42627


玻璃2309:42853


现货白银:13


COMEX白银:105


现货黄金:12


白糖2309:42846


纯碱2309:42851


甲醇2309:42852


原油:32105

Fill in the id, start the software, and follow the prompts to enter whether to display the name and the collection interval.

b61678f14d1f5e3a2721119b182ead88.png

The intention of whether to display the name is very clear, which is what I said at the beginning.

I usually set the collection interval to 5 seconds, too short is unnecessary and not recommended.

If the window size is inappropriate, you can right-click the window title box - Properties - Layout - Window Size to make corresponding changes.

c9d1c56d2d25932175638b20b4e71058.png

ebf5ec5cd8771957a287f08bc42ca83a.png

running result:

One to display the name, one not to

As for where the id comes from, it is currently capturing packets. If the software has a certain number of users, I will look at the interface to find the id list. If no one uses it, it can be saved 19daac511cc4882c19fe47912ed51ee9.png.

Futures are risky, so don't try them lightly!

Official account reply: futures , get software.

- End -

More exciting articles

Click on the business card below to follow【Occasionally type code】

Light up the little flowers bb52b477007d8e36bb5fa4812423860a.gif to let more people know

Guess you like

Origin blog.csdn.net/a18065597272/article/details/131255884