For the complete documentation index, see llms.txt. This page is also available as Markdown.

7.5. Thông tin tiền

Mô tả cách sử dụng thư viện sau khi người dùng đã đăng nhập. Chi tiết được nêu ra ở cuối chương này.

username_dnse = 'REPLACE_WITH_YOUR_DNSE_USERNAME'
password_dnse = 'REPLACE_WITH_YOUR_DNSE_PASSWORD'

client_order = client.FiinQuantConnector(
    broker='DNSE',
    username=username_dnse,
    password=password_dnse,
    smart_otp=True
).login()

orderbook = client_order.get_orderbook(
    account_id='0001009212',
    loan_id='13720'
)
cash_info = orderbook.get_balance()
print(cash_info.summary())

Mẫu kết quả trả ra là một dictionary chứa các thông tin sau:

{
    'investor_id': '0001006289',
    'account_id': '0001009212',
    'custody_code': '064C500006',
    'available_cash': 4884924031998,
    'stock_value': 208451161632,
    'withdrawable_cash': 4884923201540,
    'net_asset_value': 5093681360108,
    'margin_debt': 470067960.0,
    'margin_rate': 10000000.0,
    'error': None,'status_code': 200
}

Dữ liệu có các thuộc tính:

  • Class BaseAccountBalance

Tên thuộc tính
Kiểu dữ liệu
Mô tả

account_id

str

Mã định danh tiểu khoản.

investor_id

str

Mã định danh nhà đầu tư sở hữu tài khoản.

custody_code

str

Mã lưu ký (custody code) của nhà đầu tư.

available_cash

float

Số tiền mặt có thể sử dụng ngay.

stock_value

float

Giá trị danh mục cổ phiếu hiện tại.

net_asset_value

float

Tổng giá trị tài sản ròng của tài khoản (NAV).

margin_debt

float

Số tiền vay ký quỹ hiện tại.

margin_rate

float

Tỷ lệ ký quỹ hiện tại (%).

error

str hoặc None

Thông tin lỗi (nếu có).

status_code

int

Mã code, nếu thành công là 200

Last updated