- ago
After configuring Alpaca:

Message Log - Use the green Connect button to connect to a Broker. You may need to Configure it first.
Connect Failed: One or more errors occurred. (Response status code does not indicate success: 401 (Unauthorized).)
Alpaca Connected: Timestamp: 2021-03-22T13:50:08.378638149-04:00, Next Open: 2021-03-23T09:30:00-04:00, Next Close: 2021-03-22T16:00:00-04:00, Market is: open
Connect Failed: One or more errors occurred. (Response status code does not indicate success: 404 (Not Found).)
Alpaca Connected: Timestamp: 2021-03-22T13:52:58.962174973-04:00, Next Open: 2021-03-23T09:30:00-04:00, Next Close: 2021-03-22T16:00:00-04:00, Market is: open
Connect Failed: One or more errors occurred. (Response status code does not indicate success: 404 (Not Found).)
Alpaca Connected: Timestamp: 2021-03-22T14:29:45.716262176-04:00, Next Open: 2021-03-23T09:30:00-04:00, Next Close: 2021-03-22T16:00:00-04:00, Market is: open
Connect Failed: One or more errors occurred. (Response status code does not indicate success: 404 (Not Found).)
Alpaca Connected: Timestamp: 2021-03-22T14:35:21.985921057-04:00, Next Open: 2021-03-23T09:30:00-04:00, Next Close: 2021-03-22T16:00:00-04:00, Market is: open
Connect Failed: One or more errors occurred. (Response status code does not indicate success: 404 (Not Found).)
Alpaca Connected: Timestamp: 2021-03-22T14:39:13.958441905-04:00, Next Open: 2021-03-23T09:30:00-04:00, Next Close: 2021-03-22T16:00:00-04:00, Market is: open
Connect Failed: One or more errors occurred. (Response status code does not indicate success: 404 (Not Found).)
0
1,979
18 Replies

Reply

Bookmark

Sort
Glitch8
 ( 7.81% )
- ago
#1
Is this a paper trading account? If so, be sure that you "checked" the paper trading check box in the Alpaca Configuration dialog.
0
- ago
#2
Yes, paper trading, and yes the box is checked.
0
Glitch8
 ( 7.81% )
- ago
#3
Did you copy and paste the API Key and Secret Key into the fields, are you sure that they are correct? I verified on my setups that the paper trading connections are working normally. When did you create the paper trading account at Alpaca? I wonder if it needs some time to get fully activated?

Also, did you try placing any trades from the Order Manager? Is this when you were seeing the error messages?
0
- ago
#4
Yes, I copied and pasted. Also hand checked. Yes, I placed a paper trade order using Alpaca, and it was accepted.

However, isn't the first step to get a successful connection between Wealth-Lab and Alpaca ?


0
Glitch8
 ( 7.81% )
- ago
#5
I would think so too ... but the message about the market times indicates that the connection was actually successful. I'm trying to determine what's causing those failure messages. Can you see the paper account number in the Order Manager's Order Block along the left?

If you open the Log Viewer (Tools Menu) does it give any further information?
0
- ago
#6
Screenshots of order manager and log viewer.

0
Cone8
 ( 24.56% )
- ago
#7
Right click that last message, select the center option to copy the message details to the clipboard, and paste them here.
0
Cone8
 ( 24.56% )
- ago
#8
Right click that last message, select the center option to copy the message details to the clipboard, and paste them here.

(That red triangle means there's more detailed information that will be displayed below when you click on it.)
0
- ago
#9
3/23/2021 12:20 PM
Alpaca
Connect Failed: One or more errors occurred. (Response status code does not indicate success: 404 (Not Found).)
AggregateException
One or more errors occurred. (Response status code does not indicate success: 404 (Not Found).) Inner Exception: Response status code does not indicate success: 404 (Not Found).
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at WealthLab.Alpaca.AlpacaBroker.Connect()
at WealthLab.Backtest.BrokerBase.ConnectBroker()
at WealthLab7.cwOrderManager.SortWrapper(Object key, RoutedEventArgs pred)
0
Glitch8
 ( 7.81% )
- ago
#10
Do you see the Alpaca account number in the Order Manager Signal Block drop down?
0
- ago
#11
Where is the "signal block" dropdown ? I attached a screenshot of the order manager earlier.
0
Glitch8
 ( 7.81% )
- ago
#12
The Signal Block will appear in the left hand panel after you stage or place an order.
0
- ago
#13
I can't connect, so the place order and stage order buttons are not active.
0
Glitch8
 ( 7.81% )
- ago
#14
Can you email us at support@wealth-lab.com, we will give you an API/Secret key that is connecting for us in Alpaca paper trading. Let's see if you can connect with that key. The issue looks like the call to get your account number is failing after the initial call to get the market info. Maybe there's a problem with your particular API key? We'll get to the bottom of it!
0
- ago
#15
This issue has not been resolved. I am posting here per your comment that the Alpaca connection issues are not on topic for my recent postings regarding not seeing trades from Strategy Monitor.

When I start strategy monitor, my current broker connection is shown:


When click on the broker dropdown a small window appears, showing another dropdown and my TD Ameritrade account number. When click on the broker dropdown, I can choose the broker from three choices:


When I click on Alpaca, I briefly see this window then get the following error message:


System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (One or more errors occurred. (Response status code does not indicate success: 404 (Not Found).))
---> System.AggregateException: One or more errors occurred. (Response status code does not indicate success: 404 (Not Found).)
---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at System.Net.Http.HttpClient.GetStringAsyncCore(Task`1 getTask)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at WealthLab.Alpaca.AlpacaBroker.Connect()
at WealthLab.Backtest.BrokerBase.ConnectBroker()
at RegValue.ForgotTransactionConsumer(Object , RegValue )
at WealthLab.WPF.ucBrokerAccountDropDown.<>c__DisplayClass17_0.CustomizeInvalidIndexer()
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of inner exception stack trace ---

I have Alpaca checked in both historical and streaming providers in Data Manager.
0
Glitch8
 ( 7.81% )
- ago
#16
Can you connect to Alpaca from the Order Manager?
0
- ago
#17
Yes, I can connect with order manager and make manual trades at Alpaca. I can also make trades via their web site.

Now I have messages in the Log Viewer regarding IQ Feed and Alpaca:


Two errors have details:



The IQ feed to my computer is fine, because the snapquote utility shows a continuous data feed. I can still make manual trades at Alpaca via Order Manager.
0
Cone8
 ( 24.56% )
- ago
#18
It looks like you left things running overnight or maybe put the computer to sleep?

The IQFeed client is probably optimized for that situation, but probably you should give Wealth-Lab 7 a fresh start each day to re-establish a fresh connection to the IQFeed client.
0

Reply

Bookmark

Sort