-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shorting stock not developed? #73
Comments
Yep you are absolutely right. We haven't implemented the shorting for alpaca in the backtesting framework - this is the most significant feature that we're missing in a full alpaca integration. We are working on this, I will attach this issue to a pull. |
Thanks for the quick reply! Looking forward to the full integration. |
@EmersonDove glad you're working on this! Do you plan to do the same for Crypto (e.g. binance API)? |
@sjhermanek This is a really good question. I suppose I'm not sure of the answer because I'm not really a binance user. As I understand it, the margin API calls are through different endpoints which would make that integration significantly more complex but I'm not super sure. I think because of this we are going to wait for that more advanced stuff. |
This feature is now active on the dev branch. |
@bkunsberg , this is now live! Let us know what you think 💭 |
Thank you for adding this feature so fast! I think it will be really
useful for me (and others). Looking forward to trying it out.
…On Sun, Jan 16, 2022 at 9:05 AM Brandon Fan ***@***.***> wrote:
@bkunsberg <https://github.com/bkunsberg> , this is now live! Let us know
what you think 💭
—
Reply to this email directly, view it on GitHub
<#73 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKB4TQDFVYQ22NI33JWTOOLUWL3F3ANCNFSM5HTGU3TQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Shorting on |
The |
Supporting Binance cross margin will be great also. |
Hi,
Thank you for the very useful package!
I'm trying to backtest a strategy that involves shorting a stock/crypto. This means I make a call like:
interface.market_order('MSFT', 'sell', 1)
in a price_event function.
This results in an error message such as:
*** blankly.utils.exceptions.InvalidOrder: Not enough base currency. Available: 0.0. hold: 0. requested: 1.
I'd expect to be able to short on Alpaca, as doing a 'sell' market order (e.g. through their web console) with 0 position is successful.
Note: I've gotten the same results with
and
coinbase = CoinbasePro()
crypto = Strategy(coinbase)
Is this intentional? Thanks so much!
The text was updated successfully, but these errors were encountered: