dnse-sdk-openapi 0.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. broker-api/get_list_care_by.py +22 -0
  2. dnse/__init__.py +4 -0
  3. dnse/client.py +408 -0
  4. dnse/common.py +103 -0
  5. dnse_sdk_openapi-0.0.1.dist-info/METADATA +120 -0
  6. dnse_sdk_openapi-0.0.1.dist-info/RECORD +50 -0
  7. dnse_sdk_openapi-0.0.1.dist-info/WHEEL +5 -0
  8. dnse_sdk_openapi-0.0.1.dist-info/top_level.txt +5 -0
  9. marketdata-api/get_instruments.py +22 -0
  10. marketdata-api/get_latest_trade.py +22 -0
  11. marketdata-api/get_ohlc.py +31 -0
  12. marketdata-api/get_security_definition.py +22 -0
  13. marketdata-api/get_trades.py +22 -0
  14. marketdata-api/get_working_dates.py +22 -0
  15. trading-api/cancel_order.py +29 -0
  16. trading-api/close_position.py +27 -0
  17. trading-api/create_trading_token.py +26 -0
  18. trading-api/get_accounts.py +22 -0
  19. trading-api/get_balances.py +22 -0
  20. trading-api/get_close_price.py +22 -0
  21. trading-api/get_execution_detail.py +28 -0
  22. trading-api/get_loan_packages.py +27 -0
  23. trading-api/get_order_detail.py +28 -0
  24. trading-api/get_order_history.py +30 -0
  25. trading-api/get_orders.py +27 -0
  26. trading-api/get_position_by_id.py +26 -0
  27. trading-api/get_positions.py +26 -0
  28. trading-api/get_ppse.py +29 -0
  29. trading-api/post_order.py +38 -0
  30. trading-api/put_order.py +35 -0
  31. trading-api/send_email_otp.py +22 -0
  32. websocket-marketdata/expected_price.py +53 -0
  33. websocket-marketdata/foreign_investor.py +51 -0
  34. websocket-marketdata/market_index.py +52 -0
  35. websocket-marketdata/ohlc.py +55 -0
  36. websocket-marketdata/ohlc_closed.py +55 -0
  37. websocket-marketdata/order.py +51 -0
  38. websocket-marketdata/quote.py +50 -0
  39. websocket-marketdata/sec_def.py +52 -0
  40. websocket-marketdata/trade.py +52 -0
  41. websocket-marketdata/trade_extra.py +51 -0
  42. websocket-marketdata/trading_websocket/__init__.py +33 -0
  43. websocket-marketdata/trading_websocket/_version.py +3 -0
  44. websocket-marketdata/trading_websocket/auth.py +59 -0
  45. websocket-marketdata/trading_websocket/client.py +790 -0
  46. websocket-marketdata/trading_websocket/connection.py +151 -0
  47. websocket-marketdata/trading_websocket/encoding.py +78 -0
  48. websocket-marketdata/trading_websocket/exceptions.py +38 -0
  49. websocket-marketdata/trading_websocket/models.py +525 -0
  50. websocket-marketdata/trading_websocket/py.typed +0 -0
@@ -0,0 +1,50 @@
1
+ broker-api/get_list_care_by.py,sha256=8o6WcSANFvhn-7nI7XI1BxV4T8hTXPYAUFPOtN4ugww,436
2
+ dnse/__init__.py,sha256=6tE3QV4YpFbmIRA-dJsNMg_O-cqYBp1hyJ1bktYGQQA,80
3
+ dnse/client.py,sha256=b1fX2dMEkLn2vOMgjR_e9U0vG65mNtFk8CcnOENcE40,13043
4
+ dnse/common.py,sha256=-zsQ_7OMCIZVHNyLarsudgglyZdcybssnCQLQNJVm_k,3048
5
+ marketdata-api/get_instruments.py,sha256=58Qv9E5TIRblzrkHgMF2jDCpCylGgngsf1vseJ-LFCw,535
6
+ marketdata-api/get_latest_trade.py,sha256=R7JhA73P5IAGBrIdXdIb3XN7IjODD0T0X2MvRs-DLc0,465
7
+ marketdata-api/get_ohlc.py,sha256=SecK7c_upUEmLQ_y2i-WrIvNJUrvp6LGRyGQIC8bjDU,618
8
+ marketdata-api/get_security_definition.py,sha256=co9GKbrebn6MN9urzeRDwAG3OcFUXwGBRBtXnoYre3Y,472
9
+ marketdata-api/get_trades.py,sha256=N1vjnw9OzDOCy4iziZHHCU5A7cG7YV8Uapu88ULtDZA,552
10
+ marketdata-api/get_working_dates.py,sha256=DTUYHxNyrzuou0Ed8rrSX3zx4jEpelmfBQVX2SXBB3o,437
11
+ trading-api/cancel_order.py,sha256=j55keYAa97Dtx2LKwIMNxzFJY_zFvWha8g2xuQ5cmSE,618
12
+ trading-api/close_position.py,sha256=e7aEFiyZ5YzCWh2WyTJM_-X4NUC9Aw4xZrRqmXe_E1Y,583
13
+ trading-api/create_trading_token.py,sha256=gs_lAfe3RC5SF4TVpQ-Lp01LI985L7r6zUdhksLXxiM,512
14
+ trading-api/get_accounts.py,sha256=ceG3XHQ5v5JaSgwU0tPAda1CWxQxJm6iZcVlJ4cR-dQ,432
15
+ trading-api/get_balances.py,sha256=H-j-pmh9BPYLOZ7dmQZkUKy78QaEhoBIvoxpfONJRhE,457
16
+ trading-api/get_close_price.py,sha256=CeSrzTT70cNEjHixiQHy734D0nrZuov-EnnuCH1XrIQ,464
17
+ trading-api/get_execution_detail.py,sha256=IoggxRj5cleFgZOopCZA_vzgTKFkW0xwvj4YnC9ZV2E,581
18
+ trading-api/get_loan_packages.py,sha256=t9R5XUQhMMExYbh9kkLpSFjWfaauoEvPOdMeqGVUnAQ,536
19
+ trading-api/get_order_detail.py,sha256=Lx6lKk44cQ-L-j0WeLj5-1Z70AiPJ-CUrqky6XZZ2CI,570
20
+ trading-api/get_order_history.py,sha256=1TzHjanboU7KgN1C4AXEpj-MmmOsWcMSngEvO0cSqzg,620
21
+ trading-api/get_orders.py,sha256=0r2ByCmyg-KjIawpUWjqtpz8Z16ysqKUk6cNfAmCClc,540
22
+ trading-api/get_position_by_id.py,sha256=GaWzTaT6t_zcpBPtxr6NfiA-Ldvc8l1vWVJWFAyXntw,530
23
+ trading-api/get_positions.py,sha256=sx-mlneRiVS4R0L5ONJ_N6RKfcAIPYVxuA1O9O9mZFU,515
24
+ trading-api/get_ppse.py,sha256=JutHG2blw-5n8dSjWnsAe14hrN58flQLoyB2I1ZAkcI,578
25
+ trading-api/post_order.py,sha256=LvWvkZID3_CGwqYiG03CkYitvaDnWXGCuS3tXjdnK7E,796
26
+ trading-api/put_order.py,sha256=IYiky-CUSg2WQ1wRSN_on8cYlWXORhPccO2d_82gKb8,712
27
+ trading-api/send_email_otp.py,sha256=qOoZpo-2cvjewFr7EMPhhxO1lfux7_wOsJkOKxzOKuI,434
28
+ websocket-marketdata/expected_price.py,sha256=FYFDPzOhMHzSKwcpPQmA-U1YZfBNXtubxp8GJuo-AgM,1653
29
+ websocket-marketdata/foreign_investor.py,sha256=WVE07Pc-yeeupjylsCMJX7BmYgUeW4UMYHN4lg56MgI,1545
30
+ websocket-marketdata/market_index.py,sha256=dFkPaGUgLdPzVwTqKwXweltJ3MgRtG_c9Ty1HGDKwmQ,1487
31
+ websocket-marketdata/ohlc.py,sha256=SJW-BCdqcAUDmSJauMxBWCsci4eSrW89qZHztzRKyVo,1565
32
+ websocket-marketdata/ohlc_closed.py,sha256=oCDFmY3Dj_be1KJvhxIf7fhViz4IESqnKFw7-6jd5jg,1579
33
+ websocket-marketdata/order.py,sha256=sIUGzOGZu3ySjHinixIoCcAS7M2FN6nFK5yXo9Z9RBc,1507
34
+ websocket-marketdata/quote.py,sha256=Z029ro8XoFjG4JAGfwha2LDD-WIaVMIadWc3kYPKZXM,1468
35
+ websocket-marketdata/sec_def.py,sha256=9grITebI_Ku4Mj_Y-mTzRfX8qswdI2GOz7BN-iey1o0,1604
36
+ websocket-marketdata/trade.py,sha256=TcLiT52COHnccZcW_LJWxR5qtBOiXiL9OQ6PSdmbiUM,1498
37
+ websocket-marketdata/trade_extra.py,sha256=MAiC5pqY7PE9Uj2awbybHUmZ1GgNdCRW6YJhAMGrkmY,1556
38
+ websocket-marketdata/trading_websocket/__init__.py,sha256=wwuXQvNPqyuqmp2Qg4H11BX9aeKLUJd9IQiRLDnh4Cg,671
39
+ websocket-marketdata/trading_websocket/_version.py,sha256=GT1bwd2EjhYAt1-fAk-bfqeLIb9-9wB1DqMXg-ji9c4,80
40
+ websocket-marketdata/trading_websocket/auth.py,sha256=yrvj81jr_PXOcGMU9QkgHnN-Ifo4JjnXxVlgWvVpUPI,1534
41
+ websocket-marketdata/trading_websocket/client.py,sha256=9Dy0kd3Crjcm2Q-p3IiwJ77dmSZx4ePL9rzgXlyjwjY,29529
42
+ websocket-marketdata/trading_websocket/connection.py,sha256=DPW_isdH1etvwGoSUujgQKynlmLnZvtGq1PUW_KhvEg,5554
43
+ websocket-marketdata/trading_websocket/encoding.py,sha256=lXzjgyYP9Yk6HrHV3i011p40Lmk47ta6gioTwEV07Bc,1977
44
+ websocket-marketdata/trading_websocket/exceptions.py,sha256=2MeMym9Kk-qX2SAr4qjon3PkfuXxN2mRJ8szK4T00L0,888
45
+ websocket-marketdata/trading_websocket/models.py,sha256=cuwnmqvD_jSizW_lIuU6iY6x5jrnQiMKAGpvIeLsqSI,16747
46
+ websocket-marketdata/trading_websocket/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
47
+ dnse_sdk_openapi-0.0.1.dist-info/METADATA,sha256=PcfdCnkyXJxbtl5v8_nHDpnMiW_hZSJOr_cBGAVcTVs,6705
48
+ dnse_sdk_openapi-0.0.1.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
49
+ dnse_sdk_openapi-0.0.1.dist-info/top_level.txt,sha256=pgEu8xmLtw5ay3p61YbJ_pcPbWhcO1dxQTHfx2TG8I4,64
50
+ dnse_sdk_openapi-0.0.1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,5 @@
1
+ broker-api
2
+ dnse
3
+ marketdata-api
4
+ trading-api
5
+ websocket-marketdata
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env python3
2
+ import os
3
+ import sys
4
+
5
+ sys.path.append(os.path.dirname(os.path.dirname(__file__)))
6
+
7
+ from dnse import DNSEClient
8
+
9
+
10
+ def main():
11
+ client = DNSEClient(
12
+ api_key="replace-with-api-key",
13
+ api_secret="replace-with-api-secret",
14
+ base_url="https://openapi.dnse.com.vn",
15
+ )
16
+
17
+ status, body = client.get_instruments(symbol="SSI,SHS,ACB,AAA,VGI", market_id="", security_group_id="", index_name="", limit=100, page=1, dry_run=False)
18
+ print(status, body)
19
+
20
+
21
+ if __name__ == "__main__":
22
+ main()
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env python3
2
+ import os
3
+ import sys
4
+
5
+ sys.path.append(os.path.dirname(os.path.dirname(__file__)))
6
+
7
+ from dnse import DNSEClient
8
+
9
+
10
+ def main():
11
+ client = DNSEClient(
12
+ api_key="replace-with-api-key",
13
+ api_secret="replace-with-api-secret",
14
+ base_url="https://openapi.dnse.com.vn",
15
+ )
16
+
17
+ status, body = client.get_latest_trade(symbol="GAS", board_id="G1", dry_run=False)
18
+ print(status, body)
19
+
20
+
21
+ if __name__ == "__main__":
22
+ main()
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env python3
2
+ import os
3
+ import sys
4
+
5
+ sys.path.append(os.path.dirname(os.path.dirname(__file__)))
6
+
7
+ from dnse import DNSEClient
8
+
9
+
10
+ def main():
11
+ client = DNSEClient(
12
+ api_key="replace-with-api-key",
13
+ api_secret="replace-with-api-secret",
14
+ base_url="https://openapi.dnse.com.vn",
15
+ )
16
+
17
+ status, body = client.get_ohlc(
18
+ bar_type="STOCK",
19
+ query={
20
+ "symbol": "HPG",
21
+ "resolution": "1",
22
+ "from": 1735689600,
23
+ "to": 1735776000,
24
+ },
25
+ dry_run=False,
26
+ )
27
+ print(status, body)
28
+
29
+
30
+ if __name__ == "__main__":
31
+ main()
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env python3
2
+ import os
3
+ import sys
4
+
5
+ sys.path.append(os.path.dirname(os.path.dirname(__file__)))
6
+
7
+ from dnse import DNSEClient
8
+
9
+
10
+ def main():
11
+ client = DNSEClient(
12
+ api_key="replace-with-api-key",
13
+ api_secret="replace-with-api-secret",
14
+ base_url="https://openapi.dnse.com.vn",
15
+ )
16
+
17
+ status, body = client.get_security_definition(symbol="HPG", board_id=None, dry_run=False)
18
+ print(status, body)
19
+
20
+
21
+ if __name__ == "__main__":
22
+ main()
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env python3
2
+ import os
3
+ import sys
4
+
5
+ sys.path.append(os.path.dirname(os.path.dirname(__file__)))
6
+
7
+ from dnse import DNSEClient
8
+
9
+
10
+ def main():
11
+ client = DNSEClient(
12
+ api_key="replace-with-api-key",
13
+ api_secret="replace-with-api-secret",
14
+ base_url="https://openapi.dnse.com.vn",
15
+ )
16
+
17
+ status, body = client.get_trades(symbol="GAS", board_id="G1", from_date=1773282637, to_date=1773289837, limit = 100, order = "DESC", next_page_token=None, dry_run=False)
18
+ print(status, body)
19
+
20
+
21
+ if __name__ == "__main__":
22
+ main()
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env python3
2
+ import os
3
+ import sys
4
+
5
+ sys.path.append(os.path.dirname(os.path.dirname(__file__)))
6
+
7
+ from dnse import DNSEClient
8
+
9
+
10
+ def main():
11
+ client = DNSEClient(
12
+ api_key="replace-with-api-key",
13
+ api_secret="replace-with-api-secret",
14
+ base_url="https://openapi.dnse.com.vn",
15
+ )
16
+
17
+ status, body = client.get_working_dates(dry_run=False)
18
+ print(status, body)
19
+
20
+
21
+ if __name__ == "__main__":
22
+ main()
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env python3
2
+ import os
3
+ import sys
4
+
5
+ sys.path.append(os.path.dirname(os.path.dirname(__file__)))
6
+
7
+ from dnse import DNSEClient
8
+
9
+
10
+ def main():
11
+ client = DNSEClient(
12
+ api_key="replace-with-api-key",
13
+ api_secret="replace-with-api-secret",
14
+ base_url="https://openapi.dnse.com.vn",
15
+ )
16
+
17
+ status, body = client.cancel_order(
18
+ account_no="0001000115",
19
+ order_id="801",
20
+ market_type="STOCK",
21
+ trading_token="replace-with-trading-token",
22
+ order_category="NORMAL",
23
+ dry_run=False,
24
+ )
25
+ print(status, body)
26
+
27
+
28
+ if __name__ == "__main__":
29
+ main()
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env python3
2
+ import os
3
+ import sys
4
+
5
+ sys.path.append(os.path.dirname(os.path.dirname(__file__)))
6
+
7
+ from dnse import DNSEClient
8
+
9
+
10
+ def main():
11
+ client = DNSEClient(
12
+ api_key="replace-with-api-key",
13
+ api_secret="replace-with-api-secret",
14
+ base_url="https://openapi.dnse.com.vn",
15
+ )
16
+
17
+ status, body = client.close_position(
18
+ position_id="replace-with-position-id",
19
+ market_type="DERIVATIVE",
20
+ trading_token="replace-with-trading-token",
21
+ dry_run=False,
22
+ )
23
+ print(status, body)
24
+
25
+
26
+ if __name__ == "__main__":
27
+ main()
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env python3
2
+ import os
3
+ import sys
4
+
5
+ sys.path.append(os.path.dirname(os.path.dirname(__file__)))
6
+
7
+ from dnse import DNSEClient
8
+
9
+
10
+ def main():
11
+ client = DNSEClient(
12
+ api_key="replace-with-api-key",
13
+ api_secret="replace-with-api-secret",
14
+ base_url="https://openapi.dnse.com.vn",
15
+ )
16
+
17
+ status, body = client.create_trading_token(
18
+ otp_type="email_otp",
19
+ passcode="666666",
20
+ dry_run=False,
21
+ )
22
+ print(status, body)
23
+
24
+
25
+ if __name__ == "__main__":
26
+ main()
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env python3
2
+ import os
3
+ import sys
4
+
5
+ sys.path.append(os.path.dirname(os.path.dirname(__file__)))
6
+
7
+ from dnse import DNSEClient
8
+
9
+
10
+ def main():
11
+ client = DNSEClient(
12
+ api_key="replace-with-api-key",
13
+ api_secret="replace-with-api-secret",
14
+ base_url="https://openapi.dnse.com.vn",
15
+ )
16
+
17
+ status, body = client.get_accounts(dry_run=False)
18
+ print(status, body)
19
+
20
+
21
+ if __name__ == "__main__":
22
+ main()
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env python3
2
+ import os
3
+ import sys
4
+
5
+ sys.path.append(os.path.dirname(os.path.dirname(__file__)))
6
+
7
+ from dnse import DNSEClient
8
+
9
+
10
+ def main():
11
+ client = DNSEClient(
12
+ api_key="replace-with-api-key",
13
+ api_secret="replace-with-api-secret",
14
+ base_url="https://openapi.dnse.com.vn",
15
+ )
16
+
17
+ status, body = client.get_balances(account_no="0001000115", dry_run=False)
18
+ print(status, body)
19
+
20
+
21
+ if __name__ == "__main__":
22
+ main()
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env python3
2
+ import os
3
+ import sys
4
+
5
+ sys.path.append(os.path.dirname(os.path.dirname(__file__)))
6
+
7
+ from dnse import DNSEClient
8
+
9
+
10
+ def main():
11
+ client = DNSEClient(
12
+ api_key="replace-with-api-key",
13
+ api_secret="replace-with-api-secret",
14
+ base_url="https://openapi.dnse.com.vn",
15
+ )
16
+
17
+ status, body = client.get_close_price(symbol="GAS", board_id="G1", dry_run=False)
18
+ print(status, body)
19
+
20
+
21
+ if __name__ == "__main__":
22
+ main()
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env python3
2
+ import os
3
+ import sys
4
+
5
+ sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
6
+
7
+ from dnse import DNSEClient
8
+
9
+
10
+ def main():
11
+ client = DNSEClient(
12
+ api_key="replace-with-api-key",
13
+ api_secret="replace-with-api-secret",
14
+ base_url="https://openapi.dnse.com.vn",
15
+ )
16
+
17
+ status, body = client.get_execution_detail(
18
+ account_no="0001000115",
19
+ order_id="66",
20
+ market_type="DERIVATIVE",
21
+ order_category="NORMAL",
22
+ dry_run=False,
23
+ )
24
+ print(status, body)
25
+
26
+
27
+ if __name__ == "__main__":
28
+ main()
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env python3
2
+ import os
3
+ import sys
4
+
5
+ sys.path.append(os.path.dirname(os.path.dirname(__file__)))
6
+
7
+ from dnse import DNSEClient
8
+
9
+
10
+ def main():
11
+ client = DNSEClient(
12
+ api_key="replace-with-api-key",
13
+ api_secret="replace-with-api-secret",
14
+ base_url="https://openapi.dnse.com.vn",
15
+ )
16
+
17
+ status, body = client.get_loan_packages(
18
+ account_no="0001000115",
19
+ market_type="STOCK",
20
+ symbol="SCR",
21
+ dry_run=False,
22
+ )
23
+ print(status, body)
24
+
25
+
26
+ if __name__ == "__main__":
27
+ main()
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env python3
2
+ import os
3
+ import sys
4
+
5
+ sys.path.append(os.path.dirname(os.path.dirname(__file__)))
6
+
7
+ from dnse import DNSEClient
8
+
9
+
10
+ def main():
11
+ client = DNSEClient(
12
+ api_key="replace-with-api-key",
13
+ api_secret="replace-with-api-secret",
14
+ base_url="https://openapi.dnse.com.vn",
15
+ )
16
+
17
+ status, body = client.get_order_detail(
18
+ account_no="0001000115",
19
+ order_id="801",
20
+ market_type="STOCK",
21
+ order_category="NORMAL",
22
+ dry_run=False,
23
+ )
24
+ print(status, body)
25
+
26
+
27
+ if __name__ == "__main__":
28
+ main()
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env python3
2
+ import os
3
+ import sys
4
+
5
+ sys.path.append(os.path.dirname(os.path.dirname(__file__)))
6
+
7
+ from dnse import DNSEClient
8
+
9
+
10
+ def main():
11
+ client = DNSEClient(
12
+ api_key="replace-with-api-key",
13
+ api_secret="replace-with-api-secret",
14
+ base_url="https://openapi.dnse.com.vn",
15
+ )
16
+
17
+ status, body = client.get_order_history(
18
+ account_no="0001000115",
19
+ market_type="STOCK",
20
+ from_date="2025-12-01",
21
+ to_date="2025-12-09",
22
+ page_size=20,
23
+ page_index=1,
24
+ dry_run=False,
25
+ )
26
+ print(status, body)
27
+
28
+
29
+ if __name__ == "__main__":
30
+ main()
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env python3
2
+ import os
3
+ import sys
4
+
5
+ sys.path.append(os.path.dirname(os.path.dirname(__file__)))
6
+
7
+ from dnse import DNSEClient
8
+
9
+
10
+ def main():
11
+ client = DNSEClient(
12
+ api_key="replace-with-api-key",
13
+ api_secret="replace-with-api-secret",
14
+ base_url="https://openapi.dnse.com.vn",
15
+ )
16
+
17
+ status, body = client.get_orders(
18
+ account_no="0001000115",
19
+ market_type="STOCK",
20
+ order_category="NORMAL",
21
+ dry_run=False,
22
+ )
23
+ print(status, body)
24
+
25
+
26
+ if __name__ == "__main__":
27
+ main()
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env python3
2
+ import os
3
+ import sys
4
+
5
+ sys.path.append(os.path.dirname(os.path.dirname(__file__)))
6
+
7
+ from dnse import DNSEClient
8
+
9
+
10
+ def main():
11
+ client = DNSEClient(
12
+ api_key="replace-with-api-key",
13
+ api_secret="replace-with-api-secret",
14
+ base_url="https://openapi.dnse.com.vn",
15
+ )
16
+
17
+ status, body = client.get_position_by_id(
18
+ position_id="replace-with-position-id",
19
+ market_type="STOCK",
20
+ dry_run=False,
21
+ )
22
+ print(status, body)
23
+
24
+
25
+ if __name__ == "__main__":
26
+ main()
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env python3
2
+ import os
3
+ import sys
4
+
5
+ sys.path.append(os.path.dirname(os.path.dirname(__file__)))
6
+
7
+ from dnse import DNSEClient
8
+
9
+
10
+ def main():
11
+ client = DNSEClient(
12
+ api_key="replace-with-api-key",
13
+ api_secret="replace-with-api-secret",
14
+ base_url="https://openapi.dnse.com.vn",
15
+ )
16
+
17
+ status, body = client.get_positions(
18
+ account_no="0001000115",
19
+ market_type="DERIVATIVE",
20
+ dry_run=False,
21
+ )
22
+ print(status, body)
23
+
24
+
25
+ if __name__ == "__main__":
26
+ main()
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env python3
2
+ import os
3
+ import sys
4
+
5
+ sys.path.append(os.path.dirname(os.path.dirname(__file__)))
6
+
7
+ from dnse import DNSEClient
8
+
9
+
10
+ def main():
11
+ client = DNSEClient(
12
+ api_key="replace-with-api-key",
13
+ api_secret="replace-with-api-secret",
14
+ base_url="https://openapi.dnse.com.vn",
15
+ )
16
+
17
+ status, body = client.get_ppse(
18
+ account_no="0001000115",
19
+ market_type="STOCK",
20
+ symbol="HPG",
21
+ price=26450,
22
+ loan_package_id=2396,
23
+ dry_run=False,
24
+ )
25
+ print(status, body)
26
+
27
+
28
+ if __name__ == "__main__":
29
+ main()
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env python3
2
+ import os
3
+ import sys
4
+
5
+ sys.path.append(os.path.dirname(os.path.dirname(__file__)))
6
+
7
+ from dnse import DNSEClient
8
+
9
+
10
+ def main():
11
+ client = DNSEClient(
12
+ api_key="replace-with-api-key",
13
+ api_secret="replace-with-api-secret",
14
+ base_url="https://openapi.dnse.com.vn",
15
+ )
16
+
17
+ payload = {
18
+ "accountNo": "0001000115",
19
+ "symbol": "HPG",
20
+ "side": "NB",
21
+ "orderType": "LO",
22
+ "price": 25950,
23
+ "quantity": 100,
24
+ "loanPackageId": 2396,
25
+ }
26
+
27
+ status, body = client.post_order(
28
+ market_type="STOCK",
29
+ payload=payload,
30
+ trading_token="replace-with-trading-token",
31
+ order_category="NORMAL",
32
+ dry_run=False,
33
+ )
34
+ print(status, body)
35
+
36
+
37
+ if __name__ == "__main__":
38
+ main()
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env python3
2
+ import os
3
+ import sys
4
+
5
+ sys.path.append(os.path.dirname(os.path.dirname(__file__)))
6
+
7
+ from dnse import DNSEClient
8
+
9
+
10
+ def main():
11
+ client = DNSEClient(
12
+ api_key="replace-with-api-key",
13
+ api_secret="replace-with-api-secret",
14
+ base_url="https://openapi.dnse.com.vn",
15
+ )
16
+
17
+ payload = {
18
+ "price": 12500,
19
+ "quantity": 100,
20
+ }
21
+
22
+ status, body = client.put_order(
23
+ account_no="0001000115",
24
+ order_id="511",
25
+ market_type="STOCK",
26
+ payload=payload,
27
+ trading_token="replace-with-trading-token",
28
+ order_category="NORMAL",
29
+ dry_run=False,
30
+ )
31
+ print(status, body)
32
+
33
+
34
+ if __name__ == "__main__":
35
+ main()