question

Upvotes
Accepted
321 1 0 9

如何使用websocket获取期权链/数据

使用websocket API,有什么方法可以获取期权链/期权数据。请求键应该是什么?

例如像spx期权""0#SPX*.U" ,我需要抓取以下字段:[DSPLY_NAME","UNDERLYING","EXPIR_DATE","STRIKE_PRC","PUTCALLIND","PUT_CALL","OPINT_1"]

trepapi
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello @ivy.cao2020 ,

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

-AHS

1 Answer

· Write an Answer
Upvotes
Accepted
321 1 0 9

如果你想要那些特定的字段,你可以使用WebSocket视图功能,在JSON请求消息的 "视图 "属性中设置只对字段的子集感兴趣,如下所示:

1655202101350.png

如果你想获得该链的RIC及其数据,你需要从该链记录中获得RIC的列表,然后手动订阅每个RIC的数据:

1655202145500.png

你可以在以下资源中找到更多细节:

曾经被回答过类似的问题链接:old thread

文章:Building a Chain Expander application using Websocket API and .NET Core C#

在此文中关于链的介绍:Simple Chain objects for EMA - Part 1

希望能有所帮助。


1655202101350.png (10.4 KiB)
1655202145500.png (74.3 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.