Skip to content

async_client

Async client for Plisio API.

AsyncClient

Bases: _BaseClient

Async client for Plisio API.

Source code in src/plisio/clients/async_client.py
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
class AsyncClient(_BaseClient):
    """
    Async client for Plisio API.
    """

    def _init_session(self) -> _t.AsyncRequestSession:
        headers = self._get_headers()
        return _Session(
            headers=headers,
        )

    async def _handle_response(  # type: ignore[override] # pylint: disable=invalid-overridden-method
        self, response: _t.AsyncRequestResponse
    ) -> _t.Result:
        """
        Handle response.

        Args:
            response (Response): Response.

        Returns:
            Response: Response.

        Raises:
            PlisioRequestException: If request failed.
            PlisioAPIException: If API returned error.
        """

        if not 200 <= response.status < 300:
            raise _e.PlisioAPIException(response, response.status, await response.text())

        try:
            data: _t.Result = await response.json()
        except ValueError as exc:
            txt: str = await response.text()
            raise _e.PlisioRequestException(f"Invalid JSON response: {txt}") from exc

        return data

    async def _request(  # type: ignore[override, no-untyped-def] # pylint: disable=invalid-overridden-method
        self, method: _t.Methods, uri: _t.Text, force_params: bool = False, **kwargs
    ) -> _t.Result:
        """
        Make request.

        Args:
            method (Methods): Method.
            uri (str): Path.
            force_params (bool): Force params.
            **kwargs: Arguments.

        Returns:
            dict: Response data.

        Raises:
            PlisioRequestException: If request failed.
            PlisioAPIException: If API returned error.
        """
        requests_kwargs = self._get_request_kwargs(method, force_params, **kwargs)

        async with getattr(self._session, str(method).lower())(uri, **requests_kwargs) as response:
            return await self._handle_response(response)

    async def _get(  # type: ignore[override, no-untyped-def] # pylint: disable=invalid-overridden-method
        self, path: _t.Text, version: _t.Text = _BaseClient.API_VERSION_V1, **kwargs
    ) -> _t.Result:
        """
        Make GET request.

        Args:
            path (str): Path.
            version (str): API version.
            **kwargs: Arguments.

        Returns:
            dict: Response data.

        Raises:
            PlisioRequestException: If request failed.
            PlisioAPIException: If API returned error.
        """
        uri = self._get_uri(path, version)
        return await self._request(_Methods.GET, uri, **kwargs)

    async def _post(  # type: ignore[override, no-untyped-def] # pylint: disable=invalid-overridden-method
        self, path: _t.Text, version: _t.Text = _BaseClient.API_VERSION_V1, **kwargs
    ) -> _t.Result:
        """
        Make POST request.

        Args:
            path (str): Path.
            version (str): API version.
            **kwargs: Arguments.

        Returns:
            dict: Response data.

        Raises:
            PlisioRequestException: If request failed.
            PlisioAPIException: If API returned error.
        """

        uri = self._get_uri(path, version)
        return await self._request(_Methods.POST, uri, **kwargs)

    async def _put(  # type: ignore[override, no-untyped-def] # pylint: disable=invalid-overridden-method
        self, path: _t.Text, version: _t.Text = _BaseClient.API_VERSION_V1, **kwargs
    ) -> _t.Result:
        """
        Make PUT request.

        Args:
            path (str): Path.
            version (str): API version.
            **kwargs: Arguments.

        Returns:
            dict: Response data.

        Raises:
            PlisioRequestException: If request failed.
            PlisioAPIException: If API returned error.
        """

        uri = self._get_uri(path, version)
        return await self._request(_Methods.PUT, uri, **kwargs)

    async def _delete(  # type: ignore[override, no-untyped-def] # pylint: disable=invalid-overridden-method
        self, path: _t.Text, version: _t.Text = _BaseClient.API_VERSION_V1, **kwargs
    ) -> _t.Result:
        """
        Make DELETE request.

        Args:
            path (str): Path.
            version (str): API version.
            **kwargs: Arguments.

        Returns:
            dict: Response data.

        Raises:
            PlisioRequestException: If request failed.
            PlisioAPIException: If API returned error.
        """

        uri = self._get_uri(path, version)
        return await self._request(_Methods.DELETE, uri, **kwargs)

    async def invoice(  # pylint: disable=too-many-arguments, too-many-locals
        self,
        order_name: _t.Text,
        currency: _t.Currencies,
        amount: _t.NumberLike,
        order_number: _t.NumberLike,
        source_currency: _t.OptionalFiats = None,
        source_amount: _t.OptionalNumberLike = None,
        allowed_psys_cids: _t.OptionalPsysCids = None,
        description: _t.OptionalText = None,
        callback_url: _t.OptionalLink = None,
        success_callback_url: _t.OptionalLink = None,
        fail_callback_url: _t.OptionalLink = None,
        email: _t.OptionalEmail = None,
        language: _t.OptionalText = "en_US",
        plugin: _t.OptionalText = None,
        version: _t.OptionalText = None,
        redirect_to_invoice: _t.OptionalBool = None,
        expire_min: _t.OptionalNumberLike = None,
    ) -> _t.Result:
        """
        Create invoice.

        See Also:
            https://plisio.net/documentation/endpoints/create-an-invoice

        Args:
            order_name (str): Order name.
            order_number (int): Order number.
            currency (str): Currency.
            amount (float): Amount.
            source_currency (str): Source currency.
            source_amount (float): Source amount.
            allowed_psys_cids (list): Allowed payment systems.
            description (str): Description.
            callback_url (str): Callback URL.
            success_callback_url (str): Success callback URL.
            fail_callback_url (str): Fail callback URL.
            email (str): Email.
            language (str): Language.
            plugin (str): Plugin.
            version (str): Version.
            redirect_to_invoice (bool): Redirect to invoice.
            expire_min (int): Expire minutes.

        Returns:
            dict: Response data.

        Raises:
            PlisioRequestException: If request failed.
            PlisioAPIException: If API returned error.
        """

        params = self._get_params(locals())
        return await self._get("invoices/new", data=params, force_params=True)

    async def transactions(  # pylint: disable=too-many-arguments
        self,
        page: _t.OptionalNumberLike = None,
        limit: _t.OptionalNumberLike = None,
        shop_id: _t.OptionalNumberLike = None,
        type: _t.OptionalTransactionStatus = None,  # pylint: disable=redefined-builtin
        status: _t.OptionalTransactionStatus = None,
        currency: _t.OptionalCurrencies = None,
        search: _t.OptionalText = None,
    ) -> _t.Result:
        """
        Get transactions.

        See Also:
            https://plisio.net/documentation/endpoints/transactions

        Args:
            page (int): Page.
            limit (int): Limit.
            shop_id (int): Shop ID.
            type (str): Type.
            status (str): Status.
            currency (str): Currency.
            search (str): Search.

        Returns:
            dict: Response data.

        Raises:
            PlisioRequestException: If request failed.
            PlisioAPIException: If API returned error.
        """

        params = self._get_params(locals())
        return await self._get("operations", data=params, force_params=True)

    async def withdraw(  # pylint: disable=too-many-arguments
        self,
        currency: _t.Currencies,
        type: _t.WithdrawType,  # pylint: disable=redefined-builtin
        to: _t.Text,  # pylint: disable=invalid-name
        amount: _t.NumberLike,
        fee_plan: _t.OptionalFeePlans = None,
    ) -> _t.Result:
        """
        Withdraw.

        See Also:
            https://plisio.net/documentation/endpoints/withdrawal-mass-withdrawal

        Args:
            currency (str): Currency.
            type (str): Type.
            to (str): To.
            amount (int): Amount.
            fee_plan (str): Fee plan.

        Returns:
            dict: Response data.

        Raises:
            PlisioRequestException: If request failed.
            PlisioAPIException: If API returned error.
        """

        params = self._get_params(locals())
        return await self._get("operations/withdraw", data=params, force_params=True)

    async def transaction_details(self, id: _t.Text) -> _t.Result:  # pylint: disable=invalid-name
        """
        Get transaction details.

        See Also:
            https://plisio.net/documentation/endpoints/transaction-details

        Args:
            id (str): Transaction ID.

        Returns:
            dict: Response data.

        Raises:
            PlisioRequestException: If request failed.
            PlisioAPIException: If API returned error.
        """

        return await self._get(f"operations/{id}")

    async def balance(self, psys_cid: _t.OptionalCurrencies = None) -> _t.Result:
        """
        Get balance.

        See Also:
            https://plisio.net/documentation/endpoints/balance

        Args:
            psys_cid (str): Payment system CID.

        Returns:
            dict: Response data.

        Raises:
            PlisioRequestException: If request failed.
            PlisioAPIException: If API returned error.
        """

        return await self._get("balance/", data={"psys_cid": psys_cid}, force_params=True)

    async def fee_plans(self, psys_cid: _t.Currencies) -> _t.Result:
        """
        Get fee plans.

        See Also:
            https://plisio.net/documentation/endpoints/fee-plans

        Args:
            psys_cid (str): Payment system CID.

        Returns:
            dict: Response data.

        Raises:
            PlisioRequestException: If request failed.
            PlisioAPIException: If API returned error.
        """

        return await self._get(f"operations/fee-plan/{psys_cid}")

    async def fee_estimation(
        self,
        currency: _t.OptionalCurrencies = None,
        addresses: _t.OptionalListStr = None,
        amounts: _t.OptionalListNumberLike = None,
        fee_plan: _t.OptionalFeePlans = None,
    ) -> _t.Result:
        """
        Fee estimation.

        See Also:
            https://plisio.net/documentation/endpoints/fee-estimation

        Args:
            currency (str): Currency.
            addresses (list): Addresses
            amounts (list): Amounts.
            fee_plan (str): Fee plan.

        Returns:
            dict: Response data.

        Raises:
            PlisioRequestException: If request failed.
            PlisioAPIException: If API returned error.
        """

        params = self._get_params(locals())
        return await self._get("operations/fee", data=params, force_params=True)

    async def plisio_fee(  # pylint: disable=too-many-arguments
        self,
        currency: _t.OptionalCurrencies = None,
        addresses: _t.OptionalListStr = None,
        amounts: _t.OptionalListNumberLike = None,
        type: _t.OptionalTransactionType = None,  # pylint: disable=redefined-builtin
        fee_plan: _t.OptionalFeePlans = None,
    ) -> _t.Result:
        """
        Plisio fee.

        See Also:
            https://plisio.net/documentation/endpoints/plisio-fee

        Args:
            currency (str): Currency.
            addresses (list): Addresses
            amounts (list): Amounts.
            type (str): Type.
            fee_plan (str): Fee plan.

        Returns:
            dict: Response data.

        Raises:
            PlisioRequestException: If request failed.
            PlisioAPIException: If API returned error.
        """
        params = self._get_params(locals())
        return await self._get("operations/plisio-fee", data=params, force_params=True)

    async def crypto_coins(self) -> _t.Result:
        """
        Get crypto coins.

        See Also:
            https://plisio.net/documentation/endpoints/crypto-coins

        Returns:
            dict: Response data.

        Raises:
            PlisioRequestException: If request failed.
            PlisioAPIException: If API returned error.
        """

        return await self._get("crypto-coins")

balance(psys_cid=None) async

Get balance.

See Also

https://plisio.net/documentation/endpoints/balance

Parameters:

Name Type Description Default
psys_cid str

Payment system CID.

None

Returns:

Name Type Description
dict _t.Result

Response data.

Raises:

Type Description
PlisioRequestException

If request failed.

PlisioAPIException

If API returned error.

Source code in src/plisio/clients/async_client.py
async def balance(self, psys_cid: _t.OptionalCurrencies = None) -> _t.Result:
    """
    Get balance.

    See Also:
        https://plisio.net/documentation/endpoints/balance

    Args:
        psys_cid (str): Payment system CID.

    Returns:
        dict: Response data.

    Raises:
        PlisioRequestException: If request failed.
        PlisioAPIException: If API returned error.
    """

    return await self._get("balance/", data={"psys_cid": psys_cid}, force_params=True)

crypto_coins() async

Get crypto coins.

See Also

https://plisio.net/documentation/endpoints/crypto-coins

Returns:

Name Type Description
dict _t.Result

Response data.

Raises:

Type Description
PlisioRequestException

If request failed.

PlisioAPIException

If API returned error.

Source code in src/plisio/clients/async_client.py
async def crypto_coins(self) -> _t.Result:
    """
    Get crypto coins.

    See Also:
        https://plisio.net/documentation/endpoints/crypto-coins

    Returns:
        dict: Response data.

    Raises:
        PlisioRequestException: If request failed.
        PlisioAPIException: If API returned error.
    """

    return await self._get("crypto-coins")

fee_estimation(currency=None, addresses=None, amounts=None, fee_plan=None) async

Fee estimation.

See Also

https://plisio.net/documentation/endpoints/fee-estimation

Parameters:

Name Type Description Default
currency str

Currency.

None
addresses list

Addresses

None
amounts list

Amounts.

None
fee_plan str

Fee plan.

None

Returns:

Name Type Description
dict _t.Result

Response data.

Raises:

Type Description
PlisioRequestException

If request failed.

PlisioAPIException

If API returned error.

Source code in src/plisio/clients/async_client.py
async def fee_estimation(
    self,
    currency: _t.OptionalCurrencies = None,
    addresses: _t.OptionalListStr = None,
    amounts: _t.OptionalListNumberLike = None,
    fee_plan: _t.OptionalFeePlans = None,
) -> _t.Result:
    """
    Fee estimation.

    See Also:
        https://plisio.net/documentation/endpoints/fee-estimation

    Args:
        currency (str): Currency.
        addresses (list): Addresses
        amounts (list): Amounts.
        fee_plan (str): Fee plan.

    Returns:
        dict: Response data.

    Raises:
        PlisioRequestException: If request failed.
        PlisioAPIException: If API returned error.
    """

    params = self._get_params(locals())
    return await self._get("operations/fee", data=params, force_params=True)

fee_plans(psys_cid) async

Get fee plans.

See Also

https://plisio.net/documentation/endpoints/fee-plans

Parameters:

Name Type Description Default
psys_cid str

Payment system CID.

required

Returns:

Name Type Description
dict _t.Result

Response data.

Raises:

Type Description
PlisioRequestException

If request failed.

PlisioAPIException

If API returned error.

Source code in src/plisio/clients/async_client.py
async def fee_plans(self, psys_cid: _t.Currencies) -> _t.Result:
    """
    Get fee plans.

    See Also:
        https://plisio.net/documentation/endpoints/fee-plans

    Args:
        psys_cid (str): Payment system CID.

    Returns:
        dict: Response data.

    Raises:
        PlisioRequestException: If request failed.
        PlisioAPIException: If API returned error.
    """

    return await self._get(f"operations/fee-plan/{psys_cid}")

invoice(order_name, currency, amount, order_number, source_currency=None, source_amount=None, allowed_psys_cids=None, description=None, callback_url=None, success_callback_url=None, fail_callback_url=None, email=None, language='en_US', plugin=None, version=None, redirect_to_invoice=None, expire_min=None) async

Create invoice.

See Also

https://plisio.net/documentation/endpoints/create-an-invoice

Parameters:

Name Type Description Default
order_name str

Order name.

required
order_number int

Order number.

required
currency str

Currency.

required
amount float

Amount.

required
source_currency str

Source currency.

None
source_amount float

Source amount.

None
allowed_psys_cids list

Allowed payment systems.

None
description str

Description.

None
callback_url str

Callback URL.

None
success_callback_url str

Success callback URL.

None
fail_callback_url str

Fail callback URL.

None
email str

Email.

None
language str

Language.

'en_US'
plugin str

Plugin.

None
version str

Version.

None
redirect_to_invoice bool

Redirect to invoice.

None
expire_min int

Expire minutes.

None

Returns:

Name Type Description
dict _t.Result

Response data.

Raises:

Type Description
PlisioRequestException

If request failed.

PlisioAPIException

If API returned error.

Source code in src/plisio/clients/async_client.py
async def invoice(  # pylint: disable=too-many-arguments, too-many-locals
    self,
    order_name: _t.Text,
    currency: _t.Currencies,
    amount: _t.NumberLike,
    order_number: _t.NumberLike,
    source_currency: _t.OptionalFiats = None,
    source_amount: _t.OptionalNumberLike = None,
    allowed_psys_cids: _t.OptionalPsysCids = None,
    description: _t.OptionalText = None,
    callback_url: _t.OptionalLink = None,
    success_callback_url: _t.OptionalLink = None,
    fail_callback_url: _t.OptionalLink = None,
    email: _t.OptionalEmail = None,
    language: _t.OptionalText = "en_US",
    plugin: _t.OptionalText = None,
    version: _t.OptionalText = None,
    redirect_to_invoice: _t.OptionalBool = None,
    expire_min: _t.OptionalNumberLike = None,
) -> _t.Result:
    """
    Create invoice.

    See Also:
        https://plisio.net/documentation/endpoints/create-an-invoice

    Args:
        order_name (str): Order name.
        order_number (int): Order number.
        currency (str): Currency.
        amount (float): Amount.
        source_currency (str): Source currency.
        source_amount (float): Source amount.
        allowed_psys_cids (list): Allowed payment systems.
        description (str): Description.
        callback_url (str): Callback URL.
        success_callback_url (str): Success callback URL.
        fail_callback_url (str): Fail callback URL.
        email (str): Email.
        language (str): Language.
        plugin (str): Plugin.
        version (str): Version.
        redirect_to_invoice (bool): Redirect to invoice.
        expire_min (int): Expire minutes.

    Returns:
        dict: Response data.

    Raises:
        PlisioRequestException: If request failed.
        PlisioAPIException: If API returned error.
    """

    params = self._get_params(locals())
    return await self._get("invoices/new", data=params, force_params=True)

plisio_fee(currency=None, addresses=None, amounts=None, type=None, fee_plan=None) async

Plisio fee.

See Also

https://plisio.net/documentation/endpoints/plisio-fee

Parameters:

Name Type Description Default
currency str

Currency.

None
addresses list

Addresses

None
amounts list

Amounts.

None
type str

Type.

None
fee_plan str

Fee plan.

None

Returns:

Name Type Description
dict _t.Result

Response data.

Raises:

Type Description
PlisioRequestException

If request failed.

PlisioAPIException

If API returned error.

Source code in src/plisio/clients/async_client.py
async def plisio_fee(  # pylint: disable=too-many-arguments
    self,
    currency: _t.OptionalCurrencies = None,
    addresses: _t.OptionalListStr = None,
    amounts: _t.OptionalListNumberLike = None,
    type: _t.OptionalTransactionType = None,  # pylint: disable=redefined-builtin
    fee_plan: _t.OptionalFeePlans = None,
) -> _t.Result:
    """
    Plisio fee.

    See Also:
        https://plisio.net/documentation/endpoints/plisio-fee

    Args:
        currency (str): Currency.
        addresses (list): Addresses
        amounts (list): Amounts.
        type (str): Type.
        fee_plan (str): Fee plan.

    Returns:
        dict: Response data.

    Raises:
        PlisioRequestException: If request failed.
        PlisioAPIException: If API returned error.
    """
    params = self._get_params(locals())
    return await self._get("operations/plisio-fee", data=params, force_params=True)

transaction_details(id) async

Get transaction details.

See Also

https://plisio.net/documentation/endpoints/transaction-details

Parameters:

Name Type Description Default
id str

Transaction ID.

required

Returns:

Name Type Description
dict _t.Result

Response data.

Raises:

Type Description
PlisioRequestException

If request failed.

PlisioAPIException

If API returned error.

Source code in src/plisio/clients/async_client.py
async def transaction_details(self, id: _t.Text) -> _t.Result:  # pylint: disable=invalid-name
    """
    Get transaction details.

    See Also:
        https://plisio.net/documentation/endpoints/transaction-details

    Args:
        id (str): Transaction ID.

    Returns:
        dict: Response data.

    Raises:
        PlisioRequestException: If request failed.
        PlisioAPIException: If API returned error.
    """

    return await self._get(f"operations/{id}")

transactions(page=None, limit=None, shop_id=None, type=None, status=None, currency=None, search=None) async

Get transactions.

See Also

https://plisio.net/documentation/endpoints/transactions

Parameters:

Name Type Description Default
page int

Page.

None
limit int

Limit.

None
shop_id int

Shop ID.

None
type str

Type.

None
status str

Status.

None
currency str

Currency.

None
search str

Search.

None

Returns:

Name Type Description
dict _t.Result

Response data.

Raises:

Type Description
PlisioRequestException

If request failed.

PlisioAPIException

If API returned error.

Source code in src/plisio/clients/async_client.py
async def transactions(  # pylint: disable=too-many-arguments
    self,
    page: _t.OptionalNumberLike = None,
    limit: _t.OptionalNumberLike = None,
    shop_id: _t.OptionalNumberLike = None,
    type: _t.OptionalTransactionStatus = None,  # pylint: disable=redefined-builtin
    status: _t.OptionalTransactionStatus = None,
    currency: _t.OptionalCurrencies = None,
    search: _t.OptionalText = None,
) -> _t.Result:
    """
    Get transactions.

    See Also:
        https://plisio.net/documentation/endpoints/transactions

    Args:
        page (int): Page.
        limit (int): Limit.
        shop_id (int): Shop ID.
        type (str): Type.
        status (str): Status.
        currency (str): Currency.
        search (str): Search.

    Returns:
        dict: Response data.

    Raises:
        PlisioRequestException: If request failed.
        PlisioAPIException: If API returned error.
    """

    params = self._get_params(locals())
    return await self._get("operations", data=params, force_params=True)

withdraw(currency, type, to, amount, fee_plan=None) async

Withdraw.

See Also

https://plisio.net/documentation/endpoints/withdrawal-mass-withdrawal

Parameters:

Name Type Description Default
currency str

Currency.

required
type str

Type.

required
to str

To.

required
amount int

Amount.

required
fee_plan str

Fee plan.

None

Returns:

Name Type Description
dict _t.Result

Response data.

Raises:

Type Description
PlisioRequestException

If request failed.

PlisioAPIException

If API returned error.

Source code in src/plisio/clients/async_client.py
async def withdraw(  # pylint: disable=too-many-arguments
    self,
    currency: _t.Currencies,
    type: _t.WithdrawType,  # pylint: disable=redefined-builtin
    to: _t.Text,  # pylint: disable=invalid-name
    amount: _t.NumberLike,
    fee_plan: _t.OptionalFeePlans = None,
) -> _t.Result:
    """
    Withdraw.

    See Also:
        https://plisio.net/documentation/endpoints/withdrawal-mass-withdrawal

    Args:
        currency (str): Currency.
        type (str): Type.
        to (str): To.
        amount (int): Amount.
        fee_plan (str): Fee plan.

    Returns:
        dict: Response data.

    Raises:
        PlisioRequestException: If request failed.
        PlisioAPIException: If API returned error.
    """

    params = self._get_params(locals())
    return await self._get("operations/withdraw", data=params, force_params=True)