webull icon indicating copy to clipboard operation
webull copied to clipboard

Login Issue with webull Roth IRA account

Open emsensing opened this issue 1 year ago • 0 comments

I recently opened a new webull Roth IRA account. API failed to log in this account. The API seems couldn't see this account. I then opened an individual account under the same log in and password. This time, the API can log in this individual account succesfully.

Below is the get_account_id function, result['data'] is supposed to include both account infomation, both individual account and roth IRA account. But I only got the individual account ID in the result['data'][0]. The result['data'][1] shows that the IRA account is not open! Does any one know how to fix this? The API seems that only recognize the individual account, not roth IRA.

def get_account_id(self, id=0): ''' get account id call account id before trade actions ''' headers = self.build_req_headers()

    response = requests.get(self._urls.account_id(), headers=headers, timeout=self.timeout)
    result = response.json()
    if result['success'] and len(result['data']) > 0 :
        self.zone_var = str(result['data'][int(id)]['rzone'])
        self._account_id = str(result['data'][int(id)]['secAccountId'])
        return self._account_id
    else:
        return None

emsensing avatar Nov 16 '24 05:11 emsensing