# Error fetching position data through API

**URL:** <https://community.delta.exchange/t/error-fetching-position-data-through-api/927>\
**Category:** APIs & Algo Trading\
**Created:** [March 19, 2025, 8:38am UTC](https://community.delta.exchange/t/error-fetching-position-data-through-api/927 "2025-03-19T08:38:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![noushad](https://avatars.discourse-cdn.com/v4/letter/n/7c8e57/32.png) [@noushad](https://community.delta.exchange/u/noushad)\
**Post date:** [March 19, 2025, 8:38am UTC](https://community.delta.exchange/t/error-fetching-position-data-through-api/927/1 "2025-03-19T08:38:05Z")

</div>

I am using python. Occasionally I get the position details but some times I get the following error message.  
Failed to fetch positions. HTTP Status Code: 401  
Response: {“error”:{“code”:“expired\_signature”,“context”:{“request\_time”:1742373095,“server\_time”:1742373101}},“success”:false}

---

<div class="post-metadata">

**Author:** ![ayush.aggrwl](https://avatars.discourse-cdn.com/v4/letter/a/f04885/32.png) [@ayush.aggrwl](https://community.delta.exchange/u/ayush.aggrwl)\
**Post date:** [March 19, 2025, 10:41am UTC](https://community.delta.exchange/t/error-fetching-position-data-through-api/927/2 "2025-03-19T10:41:23Z")

</div>

Hi @noushad , the error says that your local machine clock time is not synced with delta server time.

to rectify this you can update your local machine clock settings , and press sync to come to latest time. you can also turn it on to auto sync to avoid future errors.

---

<div class="post-metadata">

**Author:** ![harsh12092002](https://avatars.discourse-cdn.com/v4/letter/h/bbce88/32.png) [@harsh12092002](https://community.delta.exchange/u/harsh12092002)\
**Post date:** [March 24, 2025, 3:51am UTC](https://community.delta.exchange/t/error-fetching-position-data-through-api/927/3 "2025-03-24T03:51:55Z")

</div>

Delta exchange api is giving very trouble…i also faced many problems with api…so i gave up by writing python script

---

<div class="post-metadata">

**Author:** ![ayush.aggrwl](https://avatars.discourse-cdn.com/v4/letter/a/f04885/32.png) [@ayush.aggrwl](https://community.delta.exchange/u/ayush.aggrwl)\
**Post date:** [March 26, 2025, 12:06pm UTC](https://community.delta.exchange/t/error-fetching-position-data-through-api/927/4 "2025-03-26T12:06:06Z")

</div>

Hi @harsh12092002 , pls share your script and specific errors you are facing. we can review it and suggest possible tweaks and help you in resolving any errors.
