SmartQuant Discussion

Automated Quantitative Strategy Development, SmartQuant Product Discussion and Technical Support Forums
It is currently Tue Jul 16, 2019 1:43 pm

All times are UTC + 3 hours




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Sat Aug 04, 2018 12:22 pm 
Offline

Joined: Fri Sep 28, 2012 8:16 am
Posts: 142
Hi,

I send a lot of orders in one second,
the exchange api must use nonce to auth.
the nonce is the time. for example:'2018-08-04 12:13:14'

the first order is success.
the second order will reject,because the nonce must increment.

the exchange provider bulk order api, i try to use it. but smartquant not support that.


Top
 Profile  
 
PostPosted: Sat Aug 18, 2018 12:35 pm 
Offline

Joined: Sat Aug 18, 2018 8:47 am
Posts: 1
good one


Top
 Profile  
 
PostPosted: Mon Aug 20, 2018 10:16 am 
Offline

Joined: Wed May 05, 2010 9:49 pm
Posts: 484
Can you please provider more details:
1)Is provider your own or one of SmartQuant?
2)Is order have been rejected by OQ2014 or by provider/exchange?


Top
 Profile  
 
PostPosted: Tue Aug 21, 2018 6:37 am 
Offline

Joined: Fri Sep 28, 2012 8:16 am
Posts: 142
Hi,

1)my own provider
2)rejected by exchange

this is the api:
https://testnet.bitmex.com/api/explorer ... er_newBulk


Top
 Profile  
 
PostPosted: Tue Aug 21, 2018 10:46 am 
Offline

Joined: Wed May 05, 2010 9:49 pm
Posts: 484
wukan wrote:
Hi,

1)my own provider
2)rejected by exchange

this is the api:
https://testnet.bitmex.com/api/explorer ... er_newBulk

In this case you can send orders following way:
1)Create order
2)Set order.ClOrderId with unique time/id
3)Send all orders
4)Your provider will use order.ClOrderId to fill nonce data
I'm not sure which parameter should be unique in API of your broker and why datetime is not unuqie when you send it...


Top
 Profile  
 
PostPosted: Wed Aug 22, 2018 8:49 am 
Offline

Joined: Fri Sep 28, 2012 8:16 am
Posts: 142
skuvv wrote:
wukan wrote:
Hi,

1)my own provider
2)rejected by exchange

this is the api:
https://testnet.bitmex.com/api/explorer ... er_newBulk

In this case you can send orders following way:
1)Create order
2)Set order.ClOrderId with unique time/id
3)Send all orders
4)Your provider will use order.ClOrderId to fill nonce data
I'm not sure which parameter should be unique in API of your broker and why datetime is not unuqie when you send it...


But how to send a lots of orders in one call?


Top
 Profile  
 
PostPosted: Wed Aug 22, 2018 10:04 am 
Offline

Joined: Wed May 05, 2010 9:49 pm
Posts: 484
wukan wrote:
skuvv wrote:
wukan wrote:
Hi,

1)my own provider
2)rejected by exchange

this is the api:
https://testnet.bitmex.com/api/explorer ... er_newBulk

In this case you can send orders following way:
1)Create order
2)Set order.ClOrderId with unique time/id
3)Send all orders
4)Your provider will use order.ClOrderId to fill nonce data
I'm not sure which parameter should be unique in API of your broker and why datetime is not unuqie when you send it...


But how to send a lots of orders in one call?

From other side, do you need a method in provider which accept bulk of orders for Send them?
Otherwise you can simple iterate all your orders to send them.


Top
 Profile  
 
PostPosted: Thu Aug 23, 2018 3:54 am 
Offline

Joined: Fri Sep 28, 2012 8:16 am
Posts: 142
skuvv wrote:
From other side, do you need a method in provider which accept bulk of orders for Send them?
Otherwise you can simple iterate all your orders to send them.


Yes, A method is better.


Top
 Profile  
 
PostPosted: Tue Aug 28, 2018 3:18 pm 
Offline

Joined: Wed May 05, 2010 9:49 pm
Posts: 484
The feature will be available on next release.
Usage example for strategy:

Code:
               Order[] orders = new Order[3];
               
               orders[0] = BuyOrder(instrument, Qty/3, "#1");
               orders[1] = BuyOrder(instrument, Qty/3, "#2");
               orders[2] = BuyOrder(instrument, Qty/3, "#3");
               
               if (ExecutionProvider is Provider)
                  Send(orders, (Provider)ExecutionProvider);
               else
                  Console.WriteLine("ExecutionProvider[{0}] is not Provider", ExecutionProvider.Name);


Your provider should inherit from Provider and override method Send(ExecutionCommand[] commands)


Top
 Profile  
 
PostPosted: Thu Aug 30, 2018 4:34 am 
Offline

Joined: Fri Sep 28, 2012 8:16 am
Posts: 142
That's great!
Thank you very much!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC + 3 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group