# API Purchase Error: message":"Sorry, an error occurred while processing your request."},"msg\_type":"buy"

**URL:** <https://community.deriv.com/t/api-purchase-error-message-sorry-an-error-occurred-while-processing-your-request-msg-type-buy/26364>\
**Category:** Trading Platforms\
**Created:** [February 3, 2022, 9:50am UTC](https://community.deriv.com/t/api-purchase-error-message-sorry-an-error-occurred-while-processing-your-request-msg-type-buy/26364 "2022-02-03T09:50:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![beeting-acuerdo-2](https://sea2.discourse-cdn.com/flex020/user_avatar/community.deriv.com/beeting-acuerdo-2/32/2018_2.png) [@beeting-acuerdo-2](https://community.deriv.com/u/beeting-acuerdo-2)\
**Post date:** [February 3, 2022, 9:50am UTC](https://community.deriv.com/t/api-purchase-error-message-sorry-an-error-occurred-while-processing-your-request-msg-type-buy/26364/1 "2022-02-03T09:50:48Z")

</div>

I have been using your api to create buy and sell orders for a month. After running the api for some few hours, each time I keep on getting this error.

```auto
"code":"WrongResponse","message":"Sorry, an error occurred while processing your request."},"msg_type":"buy"

```

At first I thought it was my internet connection which had a problem causing the api not to purchase contracts. Then I moved my bot to amazon cloud and I’m still getting the same error.

I’m using python to purchase contracts as documented in your documentations using the “subscribe” method.

Is there any workaround on this error?

---

<div class="post-metadata">

**Author:** ![bryales-amazona-1](https://avatars.discourse-cdn.com/v4/letter/b/e68b1a/32.png) [@bryales-amazona-1](https://community.deriv.com/u/bryales-amazona-1)\
**Post date:** [May 2, 2024, 1:57pm UTC](https://community.deriv.com/t/api-purchase-error-message-sorry-an-error-occurred-while-processing-your-request-msg-type-buy/26364/2 "2024-05-02T13:57:48Z")

</div>

Você conseguiu solucionar ? como resolveu ? estou com o mesmo problema.
