Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
sunli829 committed Feb 5, 2024
1 parent fef7bae commit a0b9b7c
Show file tree
Hide file tree
Showing 15 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"prettier.requireConfig": true,
"prettier.singleQuote": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.stylelint": true
"source.fixAll.eslint": "explicit",
"source.fixAll.stylelint": "explicit"
},
"editor.formatOnSave": true,
"autocorrect.enable": true,
Expand All @@ -35,5 +35,5 @@
"editor.quickSuggestions": {
"strings": true
}
},
}
}
2 changes: 1 addition & 1 deletion docs/quote/push/broker.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ message Brokers {
# 运行前请访问“开发者中心”确保账户有正确的行情权限。
# 如没有开通行情权限,可以通过“LongPort”手机客户端,并进入“我的 - 我的行情 - 行情商城”购买开通行情权限。
from time import sleep
from longport.openapi import QuoteContext, Config, SubType, PushQuote
from longport.openapi import QuoteContext, Config, SubType, PushBrokers

def on_brokers(symbol: str, event: PushBrokers):
print(symbol, event)
Expand Down
2 changes: 1 addition & 1 deletion docs/quote/push/depth.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ message Depth {
# 运行前请访问“开发者中心”确保账户有正确的行情权限。
# 如没有开通行情权限,可以通过“LongPort”手机客户端,并进入“我的 - 我的行情 - 行情商城”购买开通行情权限。
from time import sleep
from longport.openapi import QuoteContext, Config, SubType, PushQuote
from longport.openapi import QuoteContext, Config, SubType, PushDepth

def on_depth(symbol: str, event: PushDepth):
print(symbol, event)
Expand Down
2 changes: 1 addition & 1 deletion docs/quote/push/quote.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ message PushQuote {
from time import sleep
from longport.openapi import QuoteContext, Config, SubType, PushQuote

def on_quote(symbol: str, event: PushTrades):
def on_quote(symbol: str, event: PushQuote):
print(symbol, event)

config = Config.from_env()
Expand Down
2 changes: 1 addition & 1 deletion docs/quote/push/trade.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ message Trade {
# 运行前请访问“开发者中心”确保账户有正确的行情权限。
# 如没有开通行情权限,可以通过“LongPort”手机客户端,并进入“我的 - 我的行情 - 行情商城”购买开通行情权限。
from time import sleep
from longport.openapi import QuoteContext, Config, SubType, PushQuote
from longport.openapi import QuoteContext, Config, SubType, PushTrades

def on_trades(symbol: str, event: PushTrades):
print(symbol, event)
Expand Down
2 changes: 1 addition & 1 deletion docs/quote/subscribe/subscribe.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ message SubscribeRequest {
from time import sleep
from longport.openapi import QuoteContext, Config, SubType, PushQuote

def on_quote(symbol: str, event: PushTrades):
def on_quote(symbol: str, event: PushQuote):
print(symbol, event)

config = Config.from_env()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ message Brokers {
# Before running, please visit the "Developers" to ensure that the account has the correct quotes authority.
# If you do not have the quotes authority, you can enter "Me - My Quotes - Store" to purchase the authority through the "LongPort" mobile app.
from time import sleep
from longport.openapi import QuoteContext, Config, SubType, PushQuote
from longport.openapi import QuoteContext, Config, SubType, PushBrokers

def on_brokers(symbol: str, event: PushBrokers):
print(symbol, event)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ message Depth {
# Before running, please visit the "Developers" to ensure that the account has the correct quotes authority.
# If you do not have the quotes authority, you can enter "Me - My Quotes - Store" to purchase the authority through the "LongPort" mobile app.
from time import sleep
from longport.openapi import QuoteContext, Config, SubType, PushQuote
from longport.openapi import QuoteContext, Config, SubType, PushDepth

def on_depth(symbol: str, event: PushDepth):
print(symbol, event)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ message PushQuote {
from time import sleep
from longport.openapi import QuoteContext, Config, SubType, PushQuote

def on_quote(symbol: str, event: PushTrades):
def on_quote(symbol: str, event: PushQuote):
print(symbol, event)

config = Config.from_env()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ message Trade {
# Before running, please visit the "Developers" to ensure that the account has the correct quotes authority.
# If you do not have the quotes authority, you can enter "Me - My Quotes - Store" to purchase the authority through the "LongPort" mobile app.
from time import sleep
from longport.openapi import QuoteContext, Config, SubType, PushQuote
from longport.openapi import QuoteContext, Config, SubType, PushTrades

def on_trades(symbol: str, event: PushTrades):
print(symbol, event)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ message SubscribeRequest {
from time import sleep
from longport.openapi import QuoteContext, Config, SubType, PushQuote

def on_quote(symbol: str, event: PushTrades):
def on_quote(symbol: str, event: PushQuote):
print(symbol, event)

config = Config.from_env()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ message Brokers {
# 運行前請訪問“開發者中心“確保賬戶有正確的行情權限。
# 如沒有開通行情權限,可以通過“LongPort”手機客戶端,並進入“我的 - 我的行情 - 行情商城”購買開通行情權限。
from time import sleep
from longport.openapi import QuoteContext, Config, SubType, PushQuote
from longport.openapi import QuoteContext, Config, SubType, PushBrokers

def on_brokers(symbol: str, event: PushBrokers):
print(symbol, event)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ message PushQuote {
from time import sleep
from longport.openapi import QuoteContext, Config, SubType, PushQuote

def on_quote(symbol: str, event: PushTrades):
def on_quote(symbol: str, event: PushQuote):
print(symbol, event)

config = Config.from_env()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ message Trade {
# 運行前請訪問“開發者中心“確保賬戶有正確的行情權限。
# 如沒有開通行情權限,可以通過“LongPort”手機客戶端,並進入“我的 - 我的行情 - 行情商城”購買開通行情權限。
from time import sleep
from longport.openapi import QuoteContext, Config, SubType, PushQuote
from longport.openapi import QuoteContext, Config, SubType, PushTrades

def on_trades(symbol: str, event: PushTrades):
print(symbol, event)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ message SubscribeRequest {
from time import sleep
from longport.openapi import QuoteContext, Config, SubType, PushQuote

def on_quote(symbol: str, event: PushTrades):
def on_quote(symbol: str, event: PushQuote):
print(symbol, event)

config = Config.from_env()
Expand Down

0 comments on commit a0b9b7c

Please sign in to comment.