# getOptionRef API is giving empty results

**URL:** <https://forum.kx.com/t/getoptionref-api-is-giving-empty-results/14024>\
**Category:** Academy Support\
**Tags:** imported\
**Created:** [August 12, 2024, 6:32pm UTC](https://forum.kx.com/t/getoptionref-api-is-giving-empty-results/14024 "2024-08-12T18:32:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JuanpeGarcia11](https://avatars.discourse-cdn.com/v4/letter/j/bcef8e/32.png) [@JuanpeGarcia11](https://forum.kx.com/u/JuanpeGarcia11)\
**Post date:** [August 12, 2024, 6:32pm UTC](https://forum.kx.com/t/getoptionref-api-is-giving-empty-results/14024/1 "2024-08-12T18:32:43Z")

</div>

[https://learninghub.kx.com/forums/topic/getoptionref-api-is-giving-empty-results](https://learninghub.kx.com/forums/topic/getoptionref-api-is-giving-empty-results)

Hello, I'm stuck at 1.5 of the Fundamentals Capstone project.  
I'm writing a query to the getOptionRef API  
`uniqueOpts:$string distinct trade`option\_id to get a list of symbols as indicated.  
However I'm getting an empty response:  
refServiceHandle(`getOptionRef;uniqueOpts)`

`option_id inst_id opt_type strike expiry----------------------------------------`

However, when I do this query with integers to the other integral I'm getting kind of result.  
uniqueOpts2: distinct trade option\_id

refServiceHandle(`getInstRef;uniqueOpts2)  

inst\_id inst\_syb inst\_name   
------------------------------  
1 AAPL "Apple"   
2 MSFT "Microsoft"

How should I proceed in order to get some response on the getOption API?  
Best regards,  
Juan Pedro García

---

<div class="post-metadata">

**Author:** ![mwoods](https://sea2.discourse-cdn.com/flex002/user_avatar/forum.kx.com/mwoods/32/35_2.png) [@mwoods](https://forum.kx.com/u/mwoods)\
**Post date:** [August 13, 2024, 8:29am UTC](https://forum.kx.com/t/getoptionref-api-is-giving-empty-results/14024/2 "2024-08-13T08:29:05Z")

</div>

Hi @JuanpeGarcia11

What does uniqueOpts variable return in the console? Would you be able to share a screen shot of this with your code and result instead of code snippet too please?

I will be better able to assist if I can see your code and output example as we have some issues with code formatting on the forums due to be resolved soon https://learninghub.kx.com/forums/topic/known-forum-ux-issues-and-resolutions/
