Skip to main content

システムトレーディングに必要な計算や便利なPythonライブラリをまとめたパッケージ

Project description

kabu-json-lib

システムトレーディングに必要な計算や便利なPythonライブラリをまとめたパッケージです。

バージョン

  • 最新バージョン: 0.1.5
  • リリース日: 2024-03-21

機能一覧

  • bp関数: パーセント表記をベーシスポイント(bp)に変換します。
  • fetch_now関数: 現在の日本時間をdatetimeオブジェクトで返します。
  • order_to_one_line関数: 注文情報を1行の文字列にフォーマットします。

インストール方法

pip install kabu-json-lib

使い方

from kabu_json_lib import bp, fetch_now, order_to_one_line

print(bp(0.05))  # 500
print(bp(None))  # None

now = fetch_now()
print(now)  # 2023-10-01 12:34:56+09:00

# 注文情報のフォーマット例
order = {
    "long_or_short": "LONG",
    "entry_or_exit": "ENTRY",
    "symbol": "AAPL",
    "price": 150.0,
    "quantity": 100,
    "value": 15000,
    "order_type": "MARKET",
    "datetime_obj": now
}
print(order_to_one_line(order))  # [LONG -ENTRY ] AAPL @ 150.0 *   100 (¥    15000) [MARKET] 2024-03-21 12:34:56

リポジトリ

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kabu_json_lib-0.1.5.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kabu_json_lib-0.1.5-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file kabu_json_lib-0.1.5.tar.gz.

File metadata

  • Download URL: kabu_json_lib-0.1.5.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for kabu_json_lib-0.1.5.tar.gz
Algorithm Hash digest
SHA256 00bd9d5787b39619a1dfdc073b9b54d89b8c96be1b3a99317d63c28af64b81a7
MD5 5ecab33fb25963229e8a54dc46cd51ba
BLAKE2b-256 10f6c7f36ee616c310fdc04f72af69cc32d6f7920d848e56af9a24afd2816d6c

See more details on using hashes here.

File details

Details for the file kabu_json_lib-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: kabu_json_lib-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for kabu_json_lib-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 5a2510c87703b2902b1407401c082e4d58b76114033d479576691cae3f539a65
MD5 a0805802822faa1d58a7895396257379
BLAKE2b-256 eec9300eeb27c4ab57b2ba34a49a2d63650af1caf33de5468162af44598ee7e6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page