question

Upvotes
Accepted
3 1 2 4

Sending Order Via Python

Hello everyone! I am following the Python example on page 34 of the REDI API Specification (1). Below is my exact code that I cut and pasted into my editor (2).

The results are that:

The variable result is false (Meaning that the order was not submitted?)

msg returns "False Price type is required" (Meaning that the COM interface failed?)

Not sure what to do next because I am just trying the most basic example. Thanks for any feedback.

(1)

(2)

 
              
redi-api
my-code.png (38.9 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
3 1 2 4

This issue is resolved.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
23k 22 9 14

Hello @4AKD,

The code works for me, able to submit a test order, but I reproduce the same error if I either omit PriceType or misspell PriceType value.

Can you try commenting your PriceType line and adding instead

o.PriceType = "Limit"
o.Price     = "0.01"

If works, remove these two and replace with:

o.PriceType = "Market"

Let us know how it goes for you?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
3 1 2 4

Hello Zoya,

Something is still wrong here. I tried the above changes but same issue. I have attached my python program to this email so you can see if it works on your end.

I have attached my Python example as api-example-python-test-2-14-2019.zip.

Thank you.


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
23k 22 9 14

Hello @4AKD,

We have been able to confirm that you were not entitled for DEMO DMA destination.

Presently, you have been entitled, the attached code runs on my end with my account, please try again.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
3 1 2 4

I ran the exact code I sent you and still the same issue.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
23k 22 9 14

Hello @4AKD,

Please try again tomorrow. The entitlement grant may take time to propagate.

Please let us know tomorrow how it goes.

Thanks

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
3 1 2 4

1.) I noticed that I had the following message in my messages window:

<..>

11:57:02 You are not entitled for PT. <OK> 11:57:05 You are not entitled for PT. <OK>

<...>

2.) I closed out and restarted REDI.

3.) Things work when:

I changed:

o.Exchange = "DEMO DMA"

to

o.Exchange = "GSDE ARCA"

and replaced:

o.Account = "TESTACCT"

with

o.Account = "xxxxxxx" (My actual account number here)

4.) Looks like I am missing access to the DEMO DMA Exchange.

Thanks for all your help Zoya.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea