broker account creation - rejected employment_status (with a correct enum)
See original GitHub issueif we include the employment_status (with a correct enum), it will be rejected with message: “value is not a valid enumeration member”
No issue by API

the code in Google Colab: https://colab.research.google.com/drive/1XO0lEAqKsro_1i6et3B0lgUZmud61vxl
the code to reproduce:
!pip install -q alpaca-py==0.6.0
import requests
import alpaca.broker as brokerapi
from numpy import trace
import pandas as pd
from alpaca.broker.requests import CreateAccountRequest
from alpaca.broker.client import BrokerClient
from alpaca.broker.models import (
Contact,
Identity,
Disclosures,
Agreement
)
from alpaca.broker.enums import TaxIdType, FundingSource, AgreementType
api_id=''
api_key=''
client = brokerapi.BrokerClient(api_id, api_key)
# Contact
contact_data = Contact(
email_address="test41421aa4141@example.com",
phone_number="555-666-7788",
street_address=["20 N San Mateo Dr"],
city="San Mateo",
state="CA",
postal_code="94401",
country="USA"
)
# Identity
identity_data = Identity(
given_name="John",
middle_name="Smith",
family_name="Doe",
date_of_birth="1990-01-01",
tax_id="666-55-4321",
tax_id_type=TaxIdType.USA_SSN,
country_of_citizenship="USA",
country_of_birth="USA",
country_of_tax_residence="USA",
funding_source=[FundingSource.EMPLOYMENT_INCOME]
)
# Agreements
agreement_data = [
Agreement(
agreement=AgreementType.MARGIN,
signed_at="2020-09-11T18:09:33Z",
ip_address="185.13.21.99",
),
Agreement(
agreement=AgreementType.ACCOUNT,
signed_at="2020-09-11T18:13:44Z",
ip_address="185.13.21.99",
),
Agreement(
agreement=AgreementType.CUSTOMER,
signed_at="2020-09-11T18:13:44Z",
ip_address="185.13.21.99",
),
Agreement(
agreement=AgreementType.CRYPTO,
signed_at="2020-09-11T18:13:44Z",
ip_address="185.13.21.99",
)
]
# Disclosures
disclosure_data = Disclosures(
is_control_person=False,
is_affiliated_exchange_or_finra=False,
is_politically_exposed=False,
immediate_family_exposed=False,
employment_status='employed'
)
account_data = CreateAccountRequest(
contact=contact_data,
identity=identity_data,
disclosures=disclosure_data,
agreements=agreement_data
)
account = client.create_account(account_data)
print(account)
Issue Analytics
- State:
- Created 10 months ago
- Comments:6
Top Results From Across the Web
Account | Alpaca Docs
Open crypto and brokerage accounts, enable crypto and stock trading, and manage the ongoing user experience with Alpaca Broker API.
Read more >4776(S, F): The computer attempted to validate the credentials ...
Describes security event 4776(S, F) The computer attempted to validate the credentials for an account.
Read more >Anti-Enumeration and Account Testing Best Practices ... - Visa
Include IP addresses with multiple failed card payment data in a fraud detection blacklist database for manual review. • Look for excessive ...
Read more >betfair/enums.py at master - GitHub
"this session should be created is not allowed to act(play bet) in the DKs " ... TRADING_MASTER_SUSPENDED = "Suspended Trading Master Account".
Read more >Convert from enum ordinal to enum type - java - Stack Overflow
To convert an ordinal into its enum representation you might want to do this: ReportTypeEnum value = ReportTypeEnum.values()[ordinal];.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
thanks @sshcli i have raised to Rahul as well before
A similar issue have been solved by @OlegRa in PR https://github.com/alpacahq/alpaca-py/pull/182 Basically he just added a new OrderStatus
HELD = "held"
and the issue has been solved.This was the error btw:
I hope the above information helps with the troubleshooting process