Multi Broker SDK
Project description
Multi-Broker SDK
Multi-Broker SDK is a Python library that allows you to seamlessly integrate multiple brokerage services in your application. This package simplifies interaction with different brokers, providing a unified way to implement and manage your trades.
Installation
Use the package manager pip to install BrokerSDK. Run the following command in your terminal:
pip install marketfeed-multi-broker-sdk
pip install git+https://github.com/tradeclone/multi-broker-sdk.git
Usage
To utilize the functionality of BrokerSDK, import it into your Python script:
from marketfeed_multi_broker_sdk import BrokerSDK
from marketfeed_multi_broker_sdk import Broker, Login, LoginResponse
Initialize the SDK with the specific broker's name and user details:
sdk_xts = BrokerSDK(Broker.XTS, client_code='CLIENT_CODE')
sdk_fyers = BrokerSDK(Broker.FYERS, client_code='CLIENT_CODE')
sdk_shoonya = BrokerSDK(Broker.SHOONYA, client_code='CLIENT_CODE')
sdk_kotak_neo = BrokerSDK(Broker.KOTAK_NEO, client_code='CLIENT_CODE')
Use the BrokerSDK to log in. The BrokerSDK handles communication with the specific broker based on the provided broker name.
For FYERS:
loginResponse: LoginResponse = sdk_fyers.login(
Login(
totp_key="TOTP_KEY",
pin="0000"
)
)
if loginResponse.token == "":
print(loginResponse.message)
else:
print("TOKEN GENERATED", loginResponse.token)
For XTS:
loginResponse: LoginResponse = sdk_xts.login(
Login(
api_key="API_KEY",
api_secret="API_SECRET"
)
)
if loginResponse.token == "":
print(loginResponse.message)
else:
print("TOKEN GENERATED", loginResponse.token)
For SHOONYA:
loginResponse: LoginResponse = sdk_shoonya.login(
Login(
password="PASSWORD",
totp_key="TOTP_KEY",
app_vendor="APP_VENDOR",
app_imei="APP_IMEI",
app_key="APP_KEY"
)
)
if loginResponse.token == "":
print(loginResponse.message)
else:
print("TOKEN GENERATED", loginResponse.token)
For KOTAK_NEO:
loginResponse: LoginResponse = sdk_kotak_neo.login(
Login(
mobile="MOBILE",
password="PASSWORD",
mpin="MPIN",
consumer_key="CONSUMER_KEY",
consumer_secret="CONSUMER_SECRET"
)
)
if loginResponse.token == "":
print(loginResponse.message)
else:
print("TOKEN GENERATED", loginResponse.token)
Contributing
We welcome contributions from the community. If you'd like to contribute to BrokerSDK, feel free to submit a pull request or open an issue on our GitHub page.
Please make sure to update tests as appropriate.
For further details and updates about this project, please read through the documentation on our GitHub page.
Remember, your contributions enhance the capabilities of our project. Happy coding!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for marketfeed_multi_broker_sdk-0.1.25.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fd307bfb1067d89f2b226f8b497ca24369aab5a2458468b9e435ddb923cf5ea |
|
MD5 | d5aea455d5513624e1e434047893d03f |
|
BLAKE2b-256 | 856fdd5a472c7650f4ddb7e14a59ad581b82873c97abe09ea14664279ecc33f0 |
Hashes for marketfeed_multi_broker_sdk-0.1.25-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f413a09bc24f536573ec2247595bcbdc144fc5d908093784a03f0cc7f8dd417 |
|
MD5 | 6a6e72c5d1a4485aeb1b203a0121228e |
|
BLAKE2b-256 | 10f0a26bb928612ad11c72d03dae0cced393956a59c1861a4e66c08ff1676489 |