Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/finbourne/commissions-booking-script
This repository contains code that is able to connect to a portfolio within a LUSID instance, and build comission transactions based on existing transactions
https://github.com/finbourne/commissions-booking-script
Last synced: 22 days ago
JSON representation
This repository contains code that is able to connect to a portfolio within a LUSID instance, and build comission transactions based on existing transactions
- Host: GitHub
- URL: https://github.com/finbourne/commissions-booking-script
- Owner: finbourne
- License: mit
- Created: 2021-03-01T09:41:39.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-08T17:07:23.000Z (almost 4 years ago)
- Last Synced: 2023-03-01T23:15:49.486Z (almost 2 years ago)
- Language: Python
- Size: 35.2 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: docs/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: docs/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
![LUSID_by_Finbourne](./resources/Finbourne_Logo_Teal.svg)
# Commissions Booking Script
## Getting Started
### Command Line Variables
Portfolio scope (*required*):
`--scope` or `-s`
example use: `-s portfolio-scope-A`Portfolio code (*required*):
`--code` or `c`
example use: `-c portfolio-code-A`"To" date (time until transactions should be considered, in datetime string format)(*optional*):
`--datetime-iso` or `-dt`
example use: `-dt "2021-01-27T09:09:38.406917+00:00"`
default value: time nowDays going back from the "To" date for transactions to be considered (*optional*):
`--days-going-back` or `-d`
example use: `-d "30"`
default value: Days since portfolio creation date### Environment Variables
`FBN_CLIENT_ID`: your-app-client-id (From LUSID developer application)
`FBN_CLIENT_SECRET`: your-client-secret (From LUSID developer application)
`FBN_LUSID_API_URL`: https://{your-domain}.lusid.com/api
`FBN_DRIVE_API_URL`: https://{your-domain}.lusid.com/drive
`FBN_TOKEN_URL`: your-auth-token-url (From LUSID developer application)
`FBN_PASSWORD`: your-lusid-password
`FBN_USERNAME`: your-lusid-username`FBN_SECRETS_PATH`: Path to the secrets.json file including all the abvoe
## Running in dockerTo build the docker image, run:
```
docker build -t commissions-booking-script:0.0.1 .
```To run the docker image and pass authentication env variables with the `-e` tag:
```
docker run \
-e "FBN_CLIENT_ID=" \
-e "FBN_CLIENT_SECRET=" \
-e "FBN_LUSID_API_URL=https://.lusid.com/api" \
-e "FBN_DRIVE_API_URL=https://.lusid.com/drive" \
-e "FBN_TOKEN_URL= \
-e "FBN_PASSWORD=" \
-e "FBN_USERNAME=" \
commissions-booking-script:0.0.1 -s -c
```Alternatively, use a secrets.json env variable to authenticate:
```
docker run -e "FBN_SECRETS_PATH=" \
commissions-booking-script:0.0.1 -s -c
```## Running directly with python
When running directly with python, just run the `main.py` file, ensuring that the authentication environment variables and command line variables are passed similarly to how it has been done with docker.## Contributing
We welcome community participation in our tools. For information on contributing see our article [here](/finbourne/commissions-booking-script/docs)
## Reporting Issues
If you encounter any issues please report these the Github [issues page](https://github.com/finbourne/commissions-booking-script/issues).