A simpler library for the alapaca trade api
Project description
cira
A simpler libray for alpaca-trade-api from Alpaca Markets. Cira is available pip. Plz give it a star if you like it!
I was intrested in using the alpaca trade api for building quantitative paper trading.
The project paper-trader.
However after working on this for alomst a year (of and ond agian) I relized that I had alomst build a small libray for using the alpca api.
So I thought that shuld make this in to a real lib so that you also can get started with quantitative paper trading.
The name Cira is the word for a baby alpca and becose this is a simpel and small lib I thoght it would be a prefect fit.
Getting Started
Installation :arrow_down:
You can install by pip
pip install cira
Usage
Becose the alpca trade API need a key.
You need to keep your api key in a json file. Cira needs the path to the file.
key.json
{
"APCA-API-KEY-ID":"your_pub_key",
"APCA-API-SECRET-KEY":"your_private_key"
}
then you can start using the lib
import cira
cira.KEY_FILE = "../mypath/key.json"
cira.buy(1, "TSLA")
print(cira.get_postion())
cira.sell(1, "TSLA")
Wiki and doc's :closed_book:
To se more you can what you can do check out the wiki
I also have an exampel of how to build a index fund with Cira
Versioning :newspaper:
still in some what of early stages.
However I have been using this for alomst a year now.
There will most likey be quite raped updates in the beging due to bug and what not that will ecure due to the move from my own project paper-trader.
if you find bug plz let me know with a issue or if you think you know what the problem is you can ofcourse make a pull request an I will take a look at it. :smiley:
Development :wrench:
To install cira with all the dev req.
git clone git@github.com:AxelGard/cira.git
cd cira/
git checkout develop
and know you need to
python3 -m venv env
source env/bin/activate
pip install -e .[dev]
Coding style
I have been building this i a vary functional programming style. I'm also trying to follow the pep8 std notation.
License
This project is licensed under the MIT License - see the LICENSE file for details
Acknowledgments
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.