Skip to content
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

Fractional Share Purchase by 'MKT' place_order #333

Open
cjszk opened this issue Aug 1, 2022 · 3 comments
Open

Fractional Share Purchase by 'MKT' place_order #333

cjszk opened this issue Aug 1, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@cjszk
Copy link

cjszk commented Aug 1, 2022

Fractional Share Purchase Support -
Currently when calling wb.place_order(), it casts the 'quant' value to an int, rounding it.
The endpoint accepts a 'float' value for MKT orders to purchase fractional shares.

data = {
            'action': action,
            'comboType': 'NORMAL',
            'orderType': orderType,
            'outsideRegularTradingHour': outsideRegularTradingHour,
            'quantity': int(quant), # changing this to float(quant) works to execute fractional share purchase.
            'serialId': str(uuid.uuid4()),
            'tickerId': tId,
            'timeInForce': enforce
        }
@tedchou12
Copy link
Owner

let me give it a try, I think it is an easy fix.

@tedchou12
Copy link
Owner

#338

@tedchou12
Copy link
Owner

@cjszk
Could you give this branch a try?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants