# Any help with this API error please (Trying to set up paper trading API)

**URL:** <https://forum.alpaca.markets/t/any-help-with-this-api-error-please-trying-to-set-up-paper-trading-api/1064>\
**Category:** App-Integration\
**Created:** [March 31, 2020, 12:52am UTC](https://forum.alpaca.markets/t/any-help-with-this-api-error-please-trying-to-set-up-paper-trading-api/1064 "2020-03-31T00:52:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ari\_de\_souza](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/ari_de_souza/32/578_2.png) [@ari\_de\_souza](https://forum.alpaca.markets/u/ari_de_souza)\
**Post date:** [March 31, 2020, 12:52am UTC](https://forum.alpaca.markets/t/any-help-with-this-api-error-please-trying-to-set-up-paper-trading-api/1064/1 "2020-03-31T00:52:01Z")

</div>

import requests

API\_KEY = “PKVPYB865NXXX25YZXXX”  
SECRET\_KEY = “BE76FFsBHgeZ46VXxxOHAInpuwW6V7VXHn1gTGsy”

BASE\_URL = “[https://paper-api.alpaca.markets](https://paper-api.alpaca.markets)”  
ACCOUNT\_URL = “{}/V2/account”.format(BASE\_URL)

r = requests.get(ACCOUNT\_URL, headers={‘APCA-API-KEY-ID’: API\_KEY, ‘APCA-API-SECRET-KEY’: SECRET\_KEY})

print(r.content)

Error Message is:

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File “alpaca\_client.py”, line 6, in   
account = api.get\_account()  
File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/alpaca\_trade\_api/rest.py”, line 171, in get\_account  
resp = self.get(’/account’)  
File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/alpaca\_trade\_api/rest.py”, line 152, in get  
return self.\_request(‘GET’, path, data)  
File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/alpaca\_trade\_api/rest.py”, line 115, in \_request  
return self.\_one\_request(method, url, opts, retry)  
File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/alpaca\_trade\_api/rest.py”, line 144, in \_one\_request  
raise APIError(error, http\_error)  
alpaca\_trade\_api.rest.APIError: account not found for 67527d0e-0357-4c10-b3fa-b1c2d6f825e7

---

<div class="post-metadata">

**Author:** ![Brian\_Devereaux](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/brian_devereaux/32/574_2.png) [@Brian\_Devereaux](https://forum.alpaca.markets/u/Brian_Devereaux)\
**Post date:** [April 1, 2020, 11:27pm UTC](https://forum.alpaca.markets/t/any-help-with-this-api-error-please-trying-to-set-up-paper-trading-api/1064/2 "2020-04-01T23:27:05Z")

</div>

try this,  
api = tradeapi.REST(API\_KEY, SECRET\_KEY, BASE\_URL, api\_version=‘v2’)  
account = api.get\_account()  
print(account)

to post order  
api.submit\_order(‘AAPL’, 10, ‘buy’, ‘market’, ‘day’)

---

<div class="post-metadata">

**Author:** ![ari\_de\_souza](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/ari_de_souza/32/578_2.png) [@ari\_de\_souza](https://forum.alpaca.markets/u/ari_de_souza)\
**Post date:** [April 4, 2020, 3:20pm UTC](https://forum.alpaca.markets/t/any-help-with-this-api-error-please-trying-to-set-up-paper-trading-api/1064/3 "2020-04-04T15:20:32Z")

</div>

thanks!, already solved by using os to bring the site to environment and worked out…

---

<div class="post-metadata">

**Author:** ![Gayathri\_GG](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/gayathri_gg/32/1599_2.png) [@Gayathri\_GG](https://forum.alpaca.markets/u/Gayathri_GG)\
**Post date:** [November 22, 2020, 5:46am UTC](https://forum.alpaca.markets/t/any-help-with-this-api-error-please-trying-to-set-up-paper-trading-api/1064/4 "2020-11-22T05:46:07Z")

</div>

How did you solve it…  
I am getting the same error
