finatic-server-python 0.2.1__tar.gz → 0.9.1__tar.gz
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.
- finatic_server_python-0.9.1/.editorconfig +20 -0
- finatic_server_python-0.9.1/.gitignore +101 -0
- finatic_server_python-0.9.1/CHANGELOG.md +22 -0
- finatic_server_python-0.9.1/LICENSE +39 -0
- finatic_server_python-0.9.1/PKG-INFO +356 -0
- finatic_server_python-0.9.1/README.md +310 -0
- finatic_server_python-0.9.1/demo-app/README.md +115 -0
- finatic_server_python-0.9.1/demo-app/demo_cli.py +129 -0
- finatic_server_python-0.9.1/demo-app/env.example +6 -0
- finatic_server_python-0.9.1/demo-app/pyproject.toml +122 -0
- finatic_server_python-0.9.1/demo-app/uv.lock +3249 -0
- finatic_server_python-0.9.1/finatic_server_python/__init__.py +26 -0
- finatic_server_python-0.9.1/pyproject.toml +125 -0
- finatic_server_python-0.9.1/pytest.ini +5 -0
- finatic_server_python-0.9.1/quality_check.py +114 -0
- finatic_server_python-0.9.1/src/.openapi-generator-ignore +23 -0
- finatic_server_python-0.9.1/src/__init__.py +14 -0
- finatic_server_python-0.9.1/src/custom/FinaticServer.py +31 -0
- finatic_server_python-0.9.1/src/custom/__init__.py +15 -0
- finatic_server_python-0.9.1/src/custom/wrappers/brokers.py +21 -0
- finatic_server_python-0.9.1/src/custom/wrappers/company.py +19 -0
- finatic_server_python-0.9.1/src/custom/wrappers/session.py +23 -0
- finatic_server_python-0.9.1/src/generated/FinaticServer.py +2855 -0
- finatic_server_python-0.9.1/src/generated/__init__.py +340 -0
- finatic_server_python-0.9.1/src/generated/api/__init__.py +7 -0
- finatic_server_python-0.9.1/src/generated/api/brokers_api.py +4540 -0
- finatic_server_python-0.9.1/src/generated/api/company_api.py +565 -0
- finatic_server_python-0.9.1/src/generated/api/session_api.py +1221 -0
- finatic_server_python-0.9.1/src/generated/api_client.py +807 -0
- finatic_server_python-0.9.1/src/generated/api_response.py +21 -0
- finatic_server_python-0.9.1/src/generated/config.py +111 -0
- finatic_server_python-0.9.1/src/generated/configuration.py +581 -0
- finatic_server_python-0.9.1/src/generated/exceptions.py +216 -0
- finatic_server_python-0.9.1/src/generated/models/__init__.py +160 -0
- finatic_server_python-0.9.1/src/generated/models/account_status.py +37 -0
- finatic_server_python-0.9.1/src/generated/models/accountstatus0.py +142 -0
- finatic_server_python-0.9.1/src/generated/models/accounttype.py +142 -0
- finatic_server_python-0.9.1/src/generated/models/assettype.py +136 -0
- finatic_server_python-0.9.1/src/generated/models/availablebalance.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/availabletowithdraw.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/averagebuyprice.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/averagefillprice.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/averagesellprice.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/balancetype.py +136 -0
- finatic_server_python-0.9.1/src/generated/models/broker_data_account_type_enum.py +38 -0
- finatic_server_python-0.9.1/src/generated/models/broker_data_asset_type_enum.py +41 -0
- finatic_server_python-0.9.1/src/generated/models/broker_data_order_side_enum.py +37 -0
- finatic_server_python-0.9.1/src/generated/models/broker_data_order_status_enum.py +46 -0
- finatic_server_python-0.9.1/src/generated/models/broker_data_position_status_enum.py +38 -0
- finatic_server_python-0.9.1/src/generated/models/broker_info.py +127 -0
- finatic_server_python-0.9.1/src/generated/models/buyingpower.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/cashbalance.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/closedquantity.py +138 -0
- finatic_server_python-0.9.1/src/generated/models/closepriceavg.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/commission.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/commissionshare.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/company_response.py +140 -0
- finatic_server_python-0.9.1/src/generated/models/costbasis.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/costbasis1.py +138 -0
- finatic_server_python-0.9.1/src/generated/models/costbasiswithcommission.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/costbasiswithcommission1.py +138 -0
- finatic_server_python-0.9.1/src/generated/models/currentbalance.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/currentprice.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/disconnect_action_result.py +109 -0
- finatic_server_python-0.9.1/src/generated/models/eventtype.py +136 -0
- finatic_server_python-0.9.1/src/generated/models/fdx_account_status.py +40 -0
- finatic_server_python-0.9.1/src/generated/models/fdx_account_type.py +46 -0
- finatic_server_python-0.9.1/src/generated/models/fdx_asset_type.py +41 -0
- finatic_server_python-0.9.1/src/generated/models/fdx_balance_type.py +46 -0
- finatic_server_python-0.9.1/src/generated/models/fdx_broker_account.py +255 -0
- finatic_server_python-0.9.1/src/generated/models/fdx_broker_balance.py +267 -0
- finatic_server_python-0.9.1/src/generated/models/fdx_broker_order.py +224 -0
- finatic_server_python-0.9.1/src/generated/models/fdx_broker_order_event.py +206 -0
- finatic_server_python-0.9.1/src/generated/models/fdx_broker_order_fill.py +185 -0
- finatic_server_python-0.9.1/src/generated/models/fdx_broker_order_group.py +161 -0
- finatic_server_python-0.9.1/src/generated/models/fdx_broker_position.py +333 -0
- finatic_server_python-0.9.1/src/generated/models/fdx_broker_position_lot.py +216 -0
- finatic_server_python-0.9.1/src/generated/models/fdx_broker_position_lot_fill.py +139 -0
- finatic_server_python-0.9.1/src/generated/models/fdx_order_class.py +41 -0
- finatic_server_python-0.9.1/src/generated/models/fdx_order_event_type.py +53 -0
- finatic_server_python-0.9.1/src/generated/models/fdx_order_group_order.py +133 -0
- finatic_server_python-0.9.1/src/generated/models/fdx_order_group_type.py +40 -0
- finatic_server_python-0.9.1/src/generated/models/fdx_order_leg.py +253 -0
- finatic_server_python-0.9.1/src/generated/models/fdx_order_side.py +37 -0
- finatic_server_python-0.9.1/src/generated/models/fdx_order_status.py +45 -0
- finatic_server_python-0.9.1/src/generated/models/fdx_order_type.py +40 -0
- finatic_server_python-0.9.1/src/generated/models/fdx_position_side.py +37 -0
- finatic_server_python-0.9.1/src/generated/models/fdx_position_status.py +37 -0
- finatic_server_python-0.9.1/src/generated/models/fdx_security_id_type.py +39 -0
- finatic_server_python-0.9.1/src/generated/models/fdx_time_in_force.py +40 -0
- finatic_server_python-0.9.1/src/generated/models/filledquantity.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/fillprice.py +138 -0
- finatic_server_python-0.9.1/src/generated/models/fillquantity.py +138 -0
- finatic_server_python-0.9.1/src/generated/models/finatic_error.py +107 -0
- finatic_server_python-0.9.1/src/generated/models/finatic_response_company_response.py +120 -0
- finatic_server_python-0.9.1/src/generated/models/finatic_response_disconnect_action_result.py +120 -0
- finatic_server_python-0.9.1/src/generated/models/finatic_response_list_broker_info.py +120 -0
- finatic_server_python-0.9.1/src/generated/models/finatic_response_list_fdx_broker_account.py +120 -0
- finatic_server_python-0.9.1/src/generated/models/finatic_response_list_fdx_broker_balance.py +120 -0
- finatic_server_python-0.9.1/src/generated/models/finatic_response_list_fdx_broker_order.py +120 -0
- finatic_server_python-0.9.1/src/generated/models/finatic_response_list_fdx_broker_order_event.py +120 -0
- finatic_server_python-0.9.1/src/generated/models/finatic_response_list_fdx_broker_order_fill.py +120 -0
- finatic_server_python-0.9.1/src/generated/models/finatic_response_list_fdx_broker_order_group.py +120 -0
- finatic_server_python-0.9.1/src/generated/models/finatic_response_list_fdx_broker_position.py +120 -0
- finatic_server_python-0.9.1/src/generated/models/finatic_response_list_fdx_broker_position_lot.py +120 -0
- finatic_server_python-0.9.1/src/generated/models/finatic_response_list_fdx_broker_position_lot_fill.py +120 -0
- finatic_server_python-0.9.1/src/generated/models/finatic_response_list_user_broker_connection_with_permissions.py +120 -0
- finatic_server_python-0.9.1/src/generated/models/finatic_response_portal_url_response.py +120 -0
- finatic_server_python-0.9.1/src/generated/models/finatic_response_session_response_data.py +120 -0
- finatic_server_python-0.9.1/src/generated/models/finatic_response_session_user_response.py +120 -0
- finatic_server_python-0.9.1/src/generated/models/finatic_response_token_response_data.py +120 -0
- finatic_server_python-0.9.1/src/generated/models/futureunderlyingassettype.py +142 -0
- finatic_server_python-0.9.1/src/generated/models/grouptype.py +142 -0
- finatic_server_python-0.9.1/src/generated/models/http_validation_error.py +108 -0
- finatic_server_python-0.9.1/src/generated/models/initialmargin.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/limitprice.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/maintenancemargin.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/marketvalue.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/netliquidationvalue.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/openprice.py +138 -0
- finatic_server_python-0.9.1/src/generated/models/openquantity.py +138 -0
- finatic_server_python-0.9.1/src/generated/models/orderclass.py +142 -0
- finatic_server_python-0.9.1/src/generated/models/orderstatus.py +142 -0
- finatic_server_python-0.9.1/src/generated/models/ordertype.py +142 -0
- finatic_server_python-0.9.1/src/generated/models/pendingbalance.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/portal_url_response.py +100 -0
- finatic_server_python-0.9.1/src/generated/models/previousstatus.py +142 -0
- finatic_server_python-0.9.1/src/generated/models/price.py +138 -0
- finatic_server_python-0.9.1/src/generated/models/quantity.py +138 -0
- finatic_server_python-0.9.1/src/generated/models/quantity1.py +138 -0
- finatic_server_python-0.9.1/src/generated/models/quantity2.py +138 -0
- finatic_server_python-0.9.1/src/generated/models/realizedprofitloss.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/realizedprofitloss1.py +138 -0
- finatic_server_python-0.9.1/src/generated/models/realizedprofitlosspercent.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/realizedprofitlosswithcommission.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/realizedprofitlosswithcommission1.py +138 -0
- finatic_server_python-0.9.1/src/generated/models/remainingquantity.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/remainingquantity1.py +138 -0
- finatic_server_python-0.9.1/src/generated/models/securityidtype.py +136 -0
- finatic_server_python-0.9.1/src/generated/models/session_response_data.py +115 -0
- finatic_server_python-0.9.1/src/generated/models/session_start_request.py +105 -0
- finatic_server_python-0.9.1/src/generated/models/session_status.py +40 -0
- finatic_server_python-0.9.1/src/generated/models/session_user_response.py +112 -0
- finatic_server_python-0.9.1/src/generated/models/side.py +136 -0
- finatic_server_python-0.9.1/src/generated/models/side1.py +142 -0
- finatic_server_python-0.9.1/src/generated/models/side2.py +136 -0
- finatic_server_python-0.9.1/src/generated/models/side3.py +142 -0
- finatic_server_python-0.9.1/src/generated/models/status.py +136 -0
- finatic_server_python-0.9.1/src/generated/models/status1.py +142 -0
- finatic_server_python-0.9.1/src/generated/models/stopprice.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/strikeprice.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/success_payload_company_response.py +118 -0
- finatic_server_python-0.9.1/src/generated/models/success_payload_disconnect_action_result.py +118 -0
- finatic_server_python-0.9.1/src/generated/models/success_payload_list_broker_info.py +122 -0
- finatic_server_python-0.9.1/src/generated/models/success_payload_list_fdx_broker_account.py +122 -0
- finatic_server_python-0.9.1/src/generated/models/success_payload_list_fdx_broker_balance.py +122 -0
- finatic_server_python-0.9.1/src/generated/models/success_payload_list_fdx_broker_order.py +122 -0
- finatic_server_python-0.9.1/src/generated/models/success_payload_list_fdx_broker_order_event.py +122 -0
- finatic_server_python-0.9.1/src/generated/models/success_payload_list_fdx_broker_order_fill.py +122 -0
- finatic_server_python-0.9.1/src/generated/models/success_payload_list_fdx_broker_order_group.py +122 -0
- finatic_server_python-0.9.1/src/generated/models/success_payload_list_fdx_broker_position.py +122 -0
- finatic_server_python-0.9.1/src/generated/models/success_payload_list_fdx_broker_position_lot.py +122 -0
- finatic_server_python-0.9.1/src/generated/models/success_payload_list_fdx_broker_position_lot_fill.py +122 -0
- finatic_server_python-0.9.1/src/generated/models/success_payload_list_user_broker_connection_with_permissions.py +122 -0
- finatic_server_python-0.9.1/src/generated/models/success_payload_portal_url_response.py +118 -0
- finatic_server_python-0.9.1/src/generated/models/success_payload_session_response_data.py +118 -0
- finatic_server_python-0.9.1/src/generated/models/success_payload_session_user_response.py +118 -0
- finatic_server_python-0.9.1/src/generated/models/success_payload_token_response_data.py +118 -0
- finatic_server_python-0.9.1/src/generated/models/timeinforce.py +142 -0
- finatic_server_python-0.9.1/src/generated/models/token_response_data.py +103 -0
- finatic_server_python-0.9.1/src/generated/models/totalcashvalue.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/totalrealizedpnl.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/units.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/unrealizedprofitloss.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/unrealizedprofitlosspercent.py +144 -0
- finatic_server_python-0.9.1/src/generated/models/user_broker_connection_with_permissions.py +138 -0
- finatic_server_python-0.9.1/src/generated/models/validation_error.py +112 -0
- finatic_server_python-0.9.1/src/generated/models/validation_error_loc_inner.py +138 -0
- finatic_server_python-0.9.1/src/generated/rest.py +213 -0
- finatic_server_python-0.9.1/src/generated/types.py +22 -0
- finatic_server_python-0.9.1/src/generated/utils/__init__.py +48 -0
- finatic_server_python-0.9.1/src/generated/utils/cache.py +72 -0
- finatic_server_python-0.9.1/src/generated/utils/enum_coercion.py +63 -0
- finatic_server_python-0.9.1/src/generated/utils/error_handling.py +129 -0
- finatic_server_python-0.9.1/src/generated/utils/interceptors.py +102 -0
- finatic_server_python-0.9.1/src/generated/utils/logger.py +69 -0
- finatic_server_python-0.9.1/src/generated/utils/pagination.py +289 -0
- finatic_server_python-0.9.1/src/generated/utils/plain_object.py +74 -0
- finatic_server_python-0.9.1/src/generated/utils/request_id.py +12 -0
- finatic_server_python-0.9.1/src/generated/utils/retry.py +99 -0
- finatic_server_python-0.9.1/src/generated/utils/url_utils.py +74 -0
- finatic_server_python-0.9.1/src/generated/utils/validation.py +46 -0
- finatic_server_python-0.9.1/src/generated/wrappers/__init__.py +15 -0
- finatic_server_python-0.9.1/src/generated/wrappers/brokers.py +3399 -0
- finatic_server_python-0.9.1/src/generated/wrappers/company.py +297 -0
- finatic_server_python-0.9.1/src/generated/wrappers/session.py +1025 -0
- finatic_server_python-0.9.1/tests/conftest.py +27 -0
- finatic_server_python-0.9.1/tests/unit/test_brokers.py +44 -0
- finatic_server_python-0.9.1/tests/unit/test_company.py +43 -0
- finatic_server_python-0.9.1/tests/unit/test_market_data.py +44 -0
- finatic_server_python-0.9.1/tests/unit/test_session.py +44 -0
- finatic_server_python-0.9.1/uv.lock +3245 -0
- finatic_server_python-0.2.1/PKG-INFO +0 -489
- finatic_server_python-0.2.1/README.md +0 -451
- finatic_server_python-0.2.1/pyproject.toml +0 -76
- finatic_server_python-0.2.1/setup.cfg +0 -4
- finatic_server_python-0.2.1/src/finatic_server/__init__.py +0 -143
- finatic_server_python-0.2.1/src/finatic_server/core/__init__.py +0 -6
- finatic_server_python-0.2.1/src/finatic_server/core/api_client.py +0 -1884
- finatic_server_python-0.2.1/src/finatic_server/core/client.py +0 -1044
- finatic_server_python-0.2.1/src/finatic_server/types/__init__.py +0 -137
- finatic_server_python-0.2.1/src/finatic_server/types/auth.py +0 -142
- finatic_server_python-0.2.1/src/finatic_server/types/broker.py +0 -381
- finatic_server_python-0.2.1/src/finatic_server/types/common.py +0 -177
- finatic_server_python-0.2.1/src/finatic_server/types/orders.py +0 -93
- finatic_server_python-0.2.1/src/finatic_server/types/portfolio.py +0 -61
- finatic_server_python-0.2.1/src/finatic_server/types/webhook.py +0 -21
- finatic_server_python-0.2.1/src/finatic_server/utils/__init__.py +0 -27
- finatic_server_python-0.2.1/src/finatic_server/utils/errors.py +0 -94
- finatic_server_python-0.2.1/src/finatic_server_python.egg-info/PKG-INFO +0 -489
- finatic_server_python-0.2.1/src/finatic_server_python.egg-info/SOURCES.txt +0 -20
- finatic_server_python-0.2.1/src/finatic_server_python.egg-info/dependency_links.txt +0 -1
- finatic_server_python-0.2.1/src/finatic_server_python.egg-info/requires.txt +0 -14
- finatic_server_python-0.2.1/src/finatic_server_python.egg-info/top_level.txt +0 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
root = true
|
|
2
|
+
|
|
3
|
+
[*]
|
|
4
|
+
charset = utf-8
|
|
5
|
+
end_of_line = lf
|
|
6
|
+
insert_final_newline = true
|
|
7
|
+
trim_trailing_whitespace = true
|
|
8
|
+
|
|
9
|
+
[*.{ts,tsx,js,jsx,json}]
|
|
10
|
+
indent_style = space
|
|
11
|
+
indent_size = 2
|
|
12
|
+
|
|
13
|
+
[*.md]
|
|
14
|
+
trim_trailing_whitespace = false
|
|
15
|
+
|
|
16
|
+
[*.{yml,yaml}]
|
|
17
|
+
indent_size = 2
|
|
18
|
+
|
|
19
|
+
[Makefile]
|
|
20
|
+
indent_style = tab
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Dependencies
|
|
2
|
+
node_modules/
|
|
3
|
+
npm-debug.log*
|
|
4
|
+
yarn-debug.log*
|
|
5
|
+
yarn-error.log*
|
|
6
|
+
|
|
7
|
+
# Build outputs
|
|
8
|
+
dist/
|
|
9
|
+
build/
|
|
10
|
+
*.tsbuildinfo
|
|
11
|
+
|
|
12
|
+
# Environment variables
|
|
13
|
+
.env
|
|
14
|
+
.env.local
|
|
15
|
+
.env.development.local
|
|
16
|
+
.env.test.local
|
|
17
|
+
.env.production.local
|
|
18
|
+
|
|
19
|
+
# IDE
|
|
20
|
+
.vscode/
|
|
21
|
+
.idea/
|
|
22
|
+
*.swp
|
|
23
|
+
*.swo
|
|
24
|
+
*~
|
|
25
|
+
|
|
26
|
+
# OS
|
|
27
|
+
.DS_Store
|
|
28
|
+
Thumbs.db
|
|
29
|
+
|
|
30
|
+
# Testing
|
|
31
|
+
coverage/
|
|
32
|
+
.nyc_output/
|
|
33
|
+
junit.xml
|
|
34
|
+
|
|
35
|
+
# Logs
|
|
36
|
+
logs/
|
|
37
|
+
*.log
|
|
38
|
+
|
|
39
|
+
# Runtime data
|
|
40
|
+
pids/
|
|
41
|
+
*.pid
|
|
42
|
+
*.seed
|
|
43
|
+
*.pid.lock
|
|
44
|
+
|
|
45
|
+
# Optional npm cache directory
|
|
46
|
+
.npm
|
|
47
|
+
|
|
48
|
+
# Optional eslint cache
|
|
49
|
+
.eslintcache
|
|
50
|
+
|
|
51
|
+
# Microbundle cache
|
|
52
|
+
.rpt2_cache/
|
|
53
|
+
.rts2_cache_cjs/
|
|
54
|
+
.rts2_cache_es/
|
|
55
|
+
.rts2_cache_umd/
|
|
56
|
+
|
|
57
|
+
# Optional REPL history
|
|
58
|
+
.node_repl_history
|
|
59
|
+
|
|
60
|
+
# Output of 'npm pack'
|
|
61
|
+
*.tgz
|
|
62
|
+
|
|
63
|
+
# Yarn Integrity file
|
|
64
|
+
.yarn-integrity
|
|
65
|
+
|
|
66
|
+
# Yarn lock file
|
|
67
|
+
yarn.lock
|
|
68
|
+
|
|
69
|
+
# parcel-bundler cache
|
|
70
|
+
.cache
|
|
71
|
+
.parcel-cache
|
|
72
|
+
|
|
73
|
+
# Serverless directories
|
|
74
|
+
.serverless
|
|
75
|
+
|
|
76
|
+
# FuseBox cache
|
|
77
|
+
.fusebox/
|
|
78
|
+
|
|
79
|
+
# DynamoDB Local files
|
|
80
|
+
.dynamodb/
|
|
81
|
+
|
|
82
|
+
# TernJS port file
|
|
83
|
+
.tern-port
|
|
84
|
+
|
|
85
|
+
# Python specific
|
|
86
|
+
__pycache__/
|
|
87
|
+
*.py[cod]
|
|
88
|
+
*$py.class
|
|
89
|
+
*.so
|
|
90
|
+
.Python
|
|
91
|
+
*.egg-info/
|
|
92
|
+
dist/
|
|
93
|
+
build/
|
|
94
|
+
.venv/
|
|
95
|
+
venv/
|
|
96
|
+
ENV/
|
|
97
|
+
env/
|
|
98
|
+
.pytest_cache/
|
|
99
|
+
.mypy_cache/
|
|
100
|
+
.coverage
|
|
101
|
+
htmlcov/
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Features and improvements in development
|
|
13
|
+
|
|
14
|
+
## [0.9.0] - 2025-11-28
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- Initial SDK release
|
|
19
|
+
- Python SDK for Finatic Server API
|
|
20
|
+
- Support for async/await patterns
|
|
21
|
+
- Full API coverage with type hints
|
|
22
|
+
- Comprehensive error handling
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
PROPRIETARY LICENSE
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Finatic. All Rights Reserved.
|
|
4
|
+
|
|
5
|
+
NOTICE: This software development kit (the "SDK") and associated documentation files (the "Software") are the proprietary and confidential property of Finatic. All rights, title, and interest in and to the Software are and shall remain the exclusive property of Finatic.
|
|
6
|
+
|
|
7
|
+
GRANT OF LICENSE:
|
|
8
|
+
|
|
9
|
+
Subject to the terms and conditions of this License, Finatic hereby grants you a limited, non-exclusive, non-transferable, revocable license to:
|
|
10
|
+
|
|
11
|
+
1. Use the SDK solely to develop, test, and operate applications that integrate with Finatic's services;
|
|
12
|
+
2. Modify the SDK solely for your internal use in connection with such applications;
|
|
13
|
+
3. Distribute the SDK only as embedded within your applications, provided that such distribution is necessary for the operation of your applications that use Finatic's services.
|
|
14
|
+
|
|
15
|
+
RESTRICTIONS ON USE:
|
|
16
|
+
|
|
17
|
+
The following restrictions apply to your use of the Software:
|
|
18
|
+
|
|
19
|
+
1. NO STANDALONE DISTRIBUTION: You may not distribute, publish, share, transfer, give, or provide the SDK as a standalone product, library, or package to any third party, including but not limited to individuals, companies, organizations, or any other entities, without express written authorization from Finatic.
|
|
20
|
+
|
|
21
|
+
2. NO RESALE OR REPACKAGING: You may not sell, resell, lease, rent, license, sublicense, or otherwise monetize the SDK as a standalone product. You may not repackage, rebrand, or resell the SDK under your own name or brand.
|
|
22
|
+
|
|
23
|
+
3. NO COMPETING PRODUCTS: You may not use the SDK to create a competing or substitute product, service, or SDK that provides similar functionality to Finatic's services.
|
|
24
|
+
|
|
25
|
+
4. NO REVERSE ENGINEERING: You may not reverse engineer, decompile, disassemble, or otherwise analyze or examine the Software to extract source code, algorithms, or other proprietary information, except to the extent such activities are expressly permitted by applicable law notwithstanding this limitation.
|
|
26
|
+
|
|
27
|
+
5. CONFIDENTIALITY: All information contained in the Software is confidential and proprietary. You must maintain strict confidentiality and shall not disclose any information about the Software's internal structure, design, or implementation to any unauthorized party.
|
|
28
|
+
|
|
29
|
+
6. NO PUBLIC REPOSITORY PUBLICATION: You may not publish, post, upload, or make the SDK available on any public or private platform, repository, website, or any other medium, including but not limited to GitHub, GitLab, Bitbucket, NPM, PyPI, or any package registry, except as embedded within your applications as permitted above.
|
|
30
|
+
|
|
31
|
+
TERMINATION:
|
|
32
|
+
|
|
33
|
+
This license is effective until terminated. Finatic may terminate this license at any time without notice. Upon termination, you must immediately cease all use of the Software and destroy all copies in your possession.
|
|
34
|
+
|
|
35
|
+
VIOLATION OF THESE TERMS:
|
|
36
|
+
|
|
37
|
+
Any unauthorized use, modification, distribution, publication, or disclosure of the Software or any portion thereof may result in severe civil and criminal penalties, and Finatic will enforce its intellectual property rights to the fullest extent of the law.
|
|
38
|
+
|
|
39
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL FINATIC OR ITS OFFICERS, DIRECTORS, EMPLOYEES, OR AGENTS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: finatic-server-python
|
|
3
|
+
Version: 0.9.1
|
|
4
|
+
Summary: Python SDK for Finatic Server API
|
|
5
|
+
Project-URL: Homepage, https://github.com/FinaticORG/FinaticServerSDK-Python
|
|
6
|
+
Project-URL: Documentation, https://docs.finatic.com/python
|
|
7
|
+
Project-URL: Repository, https://github.com/FinaticORG/FinaticServerSDK-Python
|
|
8
|
+
Project-URL: Issues, https://github.com/FinaticORG/FinaticServerSDK-Python/issues
|
|
9
|
+
Author-email: Finatic <support@finatic.dev>
|
|
10
|
+
License: PROPRIETARY
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: api,finance,finatic,sdk,trading
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: Other/Proprietary License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Topic :: Office/Business :: Financial
|
|
23
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
|
+
Requires-Python: >=3.8.1
|
|
25
|
+
Requires-Dist: aiohttp-retry>=2.8.0
|
|
26
|
+
Requires-Dist: aiohttp>=3.8.0
|
|
27
|
+
Requires-Dist: cachetools>=5.3.0
|
|
28
|
+
Requires-Dist: pydantic>=2.0.0
|
|
29
|
+
Requires-Dist: python-dateutil>=2.8.0
|
|
30
|
+
Requires-Dist: structlog>=23.2.0
|
|
31
|
+
Requires-Dist: tenacity>=8.2.0
|
|
32
|
+
Requires-Dist: typing-extensions>=4.0.0
|
|
33
|
+
Requires-Dist: urllib3>=1.25.0
|
|
34
|
+
Provides-Extra: dev
|
|
35
|
+
Requires-Dist: black>=23.0.0; extra == 'dev'
|
|
36
|
+
Requires-Dist: flake8>=6.0.0; extra == 'dev'
|
|
37
|
+
Requires-Dist: isort>=5.12.0; extra == 'dev'
|
|
38
|
+
Requires-Dist: mypy>=1.0.0; extra == 'dev'
|
|
39
|
+
Requires-Dist: pre-commit>=3.0.0; extra == 'dev'
|
|
40
|
+
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
|
|
41
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
|
|
42
|
+
Requires-Dist: pytest>=7.0.0; extra == 'dev'
|
|
43
|
+
Requires-Dist: types-cachetools>=5.3.0; extra == 'dev'
|
|
44
|
+
Requires-Dist: types-python-dateutil>=2.8.0; extra == 'dev'
|
|
45
|
+
Description-Content-Type: text/markdown
|
|
46
|
+
|
|
47
|
+
# Finatic Python Server SDK
|
|
48
|
+
|
|
49
|
+
Python SDK for the Finatic Server API. Connect your Python applications to multiple brokerages through a unified, standardized interface.
|
|
50
|
+
|
|
51
|
+
**Finatic is a brokerage first aggregator. We simplify, standardize and enhance broker data.**
|
|
52
|
+
|
|
53
|
+
## Installation
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
pip install finatic-server-python
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Or using uv:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
uv pip install finatic-server-python
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Quick Start (5 Minutes)
|
|
66
|
+
|
|
67
|
+
### 1. Initialize the SDK
|
|
68
|
+
|
|
69
|
+
```python
|
|
70
|
+
from finatic_server_python import FinaticServer
|
|
71
|
+
|
|
72
|
+
# Initialize with your API key
|
|
73
|
+
finatic = await FinaticServer.init(
|
|
74
|
+
api_key='your-api-key',
|
|
75
|
+
user_id=None, # Optional user ID
|
|
76
|
+
sdk_config={
|
|
77
|
+
'base_url': 'https://api.finatic.dev', # Optional, defaults to production
|
|
78
|
+
'log_level': 'debug', # Optional: 'debug' | 'info' | 'warn' | 'error'
|
|
79
|
+
'structured_logging': True, # Optional: Enable structured JSON logging
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Note:** The `init()` method automatically starts a session, so you're ready to use the SDK immediately.
|
|
85
|
+
|
|
86
|
+
### 2. Get Portal URL for Authentication
|
|
87
|
+
|
|
88
|
+
The portal allows users to connect their broker accounts. Get the URL and redirect users to it:
|
|
89
|
+
|
|
90
|
+
```python
|
|
91
|
+
# Get portal URL
|
|
92
|
+
portal_url = await finatic.get_portal_url(
|
|
93
|
+
theme='dark', # Theme: 'light' | 'dark' | theme dict
|
|
94
|
+
brokers=['alpaca', 'tradier'], # Optional: Filter specific brokers
|
|
95
|
+
email='user@example.com', # Optional: Pre-fill email
|
|
96
|
+
mode='dark' # Mode: 'light' | 'dark'
|
|
97
|
+
)
|
|
98
|
+
|
|
99
|
+
print(f'Portal URL: {portal_url}')
|
|
100
|
+
# Redirect user to this URL for authentication
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### 3. Check Authentication Status
|
|
104
|
+
|
|
105
|
+
```python
|
|
106
|
+
# Check if user is authenticated
|
|
107
|
+
is_authenticated = finatic.is_authed()
|
|
108
|
+
|
|
109
|
+
# Get current user ID
|
|
110
|
+
user_id = finatic.get_user_id()
|
|
111
|
+
|
|
112
|
+
# Get session user details
|
|
113
|
+
session_user = await finatic.get_session_user()
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### 4. Fetch Data
|
|
117
|
+
|
|
118
|
+
Once users have authenticated via the portal, you can fetch broker data:
|
|
119
|
+
|
|
120
|
+
```python
|
|
121
|
+
# Get all orders (automatically paginates through all pages)
|
|
122
|
+
all_orders = await finatic.get_all_orders()
|
|
123
|
+
|
|
124
|
+
# Get orders with filters (single page)
|
|
125
|
+
orders = await finatic.get_orders(
|
|
126
|
+
broker_id='alpaca',
|
|
127
|
+
account_id='123456789',
|
|
128
|
+
order_status='filled',
|
|
129
|
+
limit=100,
|
|
130
|
+
offset=0
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
# Get all positions
|
|
134
|
+
all_positions = await finatic.get_all_positions()
|
|
135
|
+
|
|
136
|
+
# Get positions with filters
|
|
137
|
+
positions = await finatic.get_positions(
|
|
138
|
+
broker_id='alpaca',
|
|
139
|
+
symbol='AAPL',
|
|
140
|
+
limit=50
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
# Get all accounts
|
|
144
|
+
all_accounts = await finatic.get_all_accounts()
|
|
145
|
+
|
|
146
|
+
# Get balances
|
|
147
|
+
balances = await finatic.get_balances(
|
|
148
|
+
broker_id='alpaca',
|
|
149
|
+
account_id='123456789'
|
|
150
|
+
)
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Complete Example
|
|
154
|
+
|
|
155
|
+
```python
|
|
156
|
+
import asyncio
|
|
157
|
+
import os
|
|
158
|
+
from finatic_server_python import FinaticServer
|
|
159
|
+
|
|
160
|
+
async def main():
|
|
161
|
+
# 1. Initialize SDK
|
|
162
|
+
finatic = await FinaticServer.init(
|
|
163
|
+
api_key=os.getenv('FINATIC_API_KEY'),
|
|
164
|
+
user_id=None, # Optional user ID
|
|
165
|
+
sdk_config={
|
|
166
|
+
'base_url': os.getenv('FINATIC_API_URL', 'https://api.finatic.dev'),
|
|
167
|
+
'log_level': 'info',
|
|
168
|
+
}
|
|
169
|
+
)
|
|
170
|
+
|
|
171
|
+
# 2. Get portal URL for user authentication
|
|
172
|
+
portal_url = await finatic.get_portal_url('dark')
|
|
173
|
+
print('Please visit this URL to authenticate:')
|
|
174
|
+
print(portal_url)
|
|
175
|
+
|
|
176
|
+
# Wait for user to authenticate (in a real app, you'd handle this via webhook or polling)
|
|
177
|
+
# For demo purposes, we'll assume authentication is complete
|
|
178
|
+
|
|
179
|
+
# 3. Fetch data
|
|
180
|
+
orders = await finatic.get_all_orders()
|
|
181
|
+
positions = await finatic.get_all_positions()
|
|
182
|
+
accounts = await finatic.get_all_accounts()
|
|
183
|
+
|
|
184
|
+
print('Orders:', orders.success.data if orders.success else None)
|
|
185
|
+
print('Positions:', positions.success.data if positions.success else None)
|
|
186
|
+
print('Accounts:', accounts.success.data if accounts.success else None)
|
|
187
|
+
|
|
188
|
+
if __name__ == '__main__':
|
|
189
|
+
asyncio.run(main())
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## Generate One-Time Tokens for Client SDK
|
|
193
|
+
|
|
194
|
+
If you need to generate tokens for the Client SDK:
|
|
195
|
+
|
|
196
|
+
```python
|
|
197
|
+
# Get a one-time token (useful for passing to client-side applications)
|
|
198
|
+
token = await finatic.get_token()
|
|
199
|
+
|
|
200
|
+
# Or with a custom API key
|
|
201
|
+
token = await finatic.get_token(api_key='custom-api-key')
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
## Available Data Methods
|
|
205
|
+
|
|
206
|
+
### Orders
|
|
207
|
+
|
|
208
|
+
- `get_orders(**params)` - Get single page of orders
|
|
209
|
+
- `get_all_orders(**params)` - Get all orders (auto-paginated)
|
|
210
|
+
- `get_order_fills(order_id, **params)` - Get fills for a specific order
|
|
211
|
+
- `get_all_order_fills(order_id, **params)` - Get all fills (auto-paginated)
|
|
212
|
+
- `get_order_events(order_id, **params)` - Get events for a specific order
|
|
213
|
+
- `get_all_order_events(order_id, **params)` - Get all events (auto-paginated)
|
|
214
|
+
- `get_order_groups(**params)` - Get order groups
|
|
215
|
+
- `get_all_order_groups(**params)` - Get all order groups (auto-paginated)
|
|
216
|
+
|
|
217
|
+
### Positions
|
|
218
|
+
|
|
219
|
+
- `get_positions(**params)` - Get single page of positions
|
|
220
|
+
- `get_all_positions(**params)` - Get all positions (auto-paginated)
|
|
221
|
+
- `get_position_lots(**params)` - Get position lots
|
|
222
|
+
- `get_all_position_lots(**params)` - Get all position lots (auto-paginated)
|
|
223
|
+
- `get_position_lot_fills(lot_id, **params)` - Get fills for a specific lot
|
|
224
|
+
- `get_all_position_lot_fills(lot_id, **params)` - Get all fills (auto-paginated)
|
|
225
|
+
|
|
226
|
+
### Accounts & Balances
|
|
227
|
+
|
|
228
|
+
- `get_accounts(**params)` - Get single page of accounts
|
|
229
|
+
- `get_all_accounts(**params)` - Get all accounts (auto-paginated)
|
|
230
|
+
- `get_balances(**params)` - Get balances
|
|
231
|
+
- `get_all_balances(**params)` - Get all balances (auto-paginated)
|
|
232
|
+
|
|
233
|
+
### Broker Management
|
|
234
|
+
|
|
235
|
+
- `get_brokers()` - Get available brokers
|
|
236
|
+
- `get_broker_connections()` - Get connected broker accounts
|
|
237
|
+
- `disconnect_company_from_broker(connection_id)` - Disconnect a broker
|
|
238
|
+
|
|
239
|
+
### Company
|
|
240
|
+
|
|
241
|
+
- `get_company(company_id)` - Get company information
|
|
242
|
+
|
|
243
|
+
## Method Parameters
|
|
244
|
+
|
|
245
|
+
Most data methods accept optional keyword arguments:
|
|
246
|
+
|
|
247
|
+
```python
|
|
248
|
+
{
|
|
249
|
+
'broker_id': 'alpaca', # Filter by broker (e.g., 'alpaca', 'tradier')
|
|
250
|
+
'connection_id': 'uuid', # Filter by connection ID
|
|
251
|
+
'account_id': '123456789', # Filter by account ID
|
|
252
|
+
'symbol': 'AAPL', # Filter by symbol
|
|
253
|
+
'order_status': 'filled', # Filter by order status
|
|
254
|
+
'side': 'buy', # Filter by side ('buy' | 'sell')
|
|
255
|
+
'asset_type': 'equity', # Filter by asset type
|
|
256
|
+
'limit': 100, # Page size (default: varies by endpoint)
|
|
257
|
+
'offset': 0, # Pagination offset (default: 0)
|
|
258
|
+
'include_metadata': True, # Include metadata in response
|
|
259
|
+
# ... other filters specific to each method
|
|
260
|
+
}
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
## Response Format
|
|
264
|
+
|
|
265
|
+
All data methods return a `FinaticResponse` object:
|
|
266
|
+
|
|
267
|
+
```python
|
|
268
|
+
{
|
|
269
|
+
'success': {
|
|
270
|
+
'data': [...], # List of data items
|
|
271
|
+
# ... other metadata
|
|
272
|
+
},
|
|
273
|
+
'error': {
|
|
274
|
+
'message': 'Error message',
|
|
275
|
+
'code': 'ERROR_CODE'
|
|
276
|
+
},
|
|
277
|
+
'warning': [...]
|
|
278
|
+
}
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
Access the data:
|
|
282
|
+
|
|
283
|
+
```python
|
|
284
|
+
result = await finatic.get_orders()
|
|
285
|
+
if result.success:
|
|
286
|
+
orders = result.success.data
|
|
287
|
+
# Use orders...
|
|
288
|
+
else:
|
|
289
|
+
print(f'Error: {result.error.message}')
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
## Session Management
|
|
293
|
+
|
|
294
|
+
```python
|
|
295
|
+
# Start a new session (usually done automatically in init())
|
|
296
|
+
session_result = await finatic.start_session()
|
|
297
|
+
|
|
298
|
+
# Get session user
|
|
299
|
+
session_user = await finatic.get_session_user()
|
|
300
|
+
|
|
301
|
+
# Get session ID
|
|
302
|
+
session_id = finatic.get_session_id()
|
|
303
|
+
|
|
304
|
+
# Get company ID
|
|
305
|
+
company_id = finatic.get_company_id()
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
## Configuration Options
|
|
309
|
+
|
|
310
|
+
```python
|
|
311
|
+
finatic = await FinaticServer.init(
|
|
312
|
+
api_key='your-api-key',
|
|
313
|
+
user_id=None,
|
|
314
|
+
sdk_config={
|
|
315
|
+
'base_url': 'https://api.finatic.dev', # API base URL
|
|
316
|
+
'log_level': 'info', # 'debug' | 'info' | 'warn' | 'error'
|
|
317
|
+
'structured_logging': False, # Enable structured JSON logging
|
|
318
|
+
# ... other options
|
|
319
|
+
}
|
|
320
|
+
)
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
## Development
|
|
324
|
+
|
|
325
|
+
```bash
|
|
326
|
+
# Install dependencies
|
|
327
|
+
uv pip install -e .
|
|
328
|
+
|
|
329
|
+
# Build
|
|
330
|
+
python -m build
|
|
331
|
+
|
|
332
|
+
# Run tests
|
|
333
|
+
pytest
|
|
334
|
+
|
|
335
|
+
# Lint
|
|
336
|
+
ruff check .
|
|
337
|
+
|
|
338
|
+
# Format
|
|
339
|
+
ruff format .
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
## Documentation
|
|
343
|
+
|
|
344
|
+
Full API documentation is available at [docs.finatic.com/server/python](https://docs.finatic.com/server/python).
|
|
345
|
+
|
|
346
|
+
## License
|
|
347
|
+
|
|
348
|
+
MIT
|
|
349
|
+
|
|
350
|
+
## Copyright
|
|
351
|
+
|
|
352
|
+
© Copyright 2025 Finatic. All Rights Reserved.
|
|
353
|
+
|
|
354
|
+
---
|
|
355
|
+
|
|
356
|
+
**Finatic** - Fast. Secure. Standardized.
|