question

Upvotes
Accepted
582 8 12 23

JET Quote subscribe to all available fields

Does anyone know if it's possible to make a Quote subscription via JET api (without having to provide a Field) for all available fields? This is the code to subscribe: var quote = JET.Quotes.create() .rics("GOOG.O") .onUpdate(function (subscription, ric, updatedValues) { var allFieldsValues = subscription.getFieldsValues(ric); }) .start(); This is the ERROR: Uncaught Chain or a RICs and at least one field should be specified to start a subscription Quote.js: 435 Does JET Quote plugin always require the field list (at least one field)? I understand you can specify the fields in the request (but I want to get back the full list of fields) .rawFields("CF_BID") or .formattedFields("PCTCHNG") Thanks
eikoneikon-app-studiojet
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.

1 Answer

Upvotes
Accepted
582 8 12 23

I found the answer:

You can use “*” as a parameter in rawFields() or formattedFields() in Quotes plug-in object.

var quote = JET.Quotes.create()

.rics("GOOG.O")

.rawFields("*")

.onUpdate(function (subscription, ric, updatedValues) {

console.log(subscription.getFieldsValues(ric)); })

.start();

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.

Just a thought: do you really need all fields ? The more fields you subscribe to, the heavier the load on the app and machine running it.

Click below to post an Idea Post Idea