btcpayserver/BTCPayServer.Client/Models
Andrew Camilleri 76a6d94bbe
Exchange api no kraken (#3679)
* WIP New APIs for dealing with custodians/exchanges

* Simplified things

* More API refinements + index.html file for quick viewing

* Finishing touches on spec

* Switched cryptoCode to paymentMethod as this allows us to differentiate between onchain and lightning

* Moved draft API docs to "/docs-draft"

* WIP baby steps

* Added DB migration for CustodianAccountData

* Rough but working POST /v1/api/custodian-account + GET /v1/api/custodian

* WIP + early Kraken API client

* Moved service registration to proper location

* Working create + list custodian accounts + permissions + WIP Kraken client

* Kraken API Balances call is working

* Added asset balances to response

* List Custodian Accounts call does not load assetBalances by default, because it can fail. Can be requested when needed.

* Call to get the details of 1 specific custodian account

* Added permissions to swagger

* Added "tradableAssetPairs" to Kraken custodian response + cache the tradable pairs in memory for 24 hours

* Removed unused file

* WIP + Moved files to better locations

* Updated docs

* Working API endpoint to get info on a trade (same response as creating a new trade)

* Working API endpoints for Deposit + Trade + untested Withdraw

* Delete custodian account

* Trading works, better error handling, cleanup

* Working withdrawals + New endpoint for getting bid/ask prices

* Completed withdrawals + new endpoint for getting info on a past withdrawal to simplify testing, Enums are output as strings,

* Better error handling when withdrawing to a wrong destination

* WithdrawalAddressName in config is now a string per currency (dictionary)

* Added TODOs

* Only show the custodian account "config" to users who are allowed

* Added the new permissions to the API Keys UI

* Renamed KrakenClient to KrakenExchange

* WIP Kraken Config Form

* Removed files for UI again, will make separate PR later

* Fixed docs + Refactored to use PaymentMethod more + Added "name" to custodian account + Using cancelationToken everywhere

* Updated withdrawal info docs

* First unit test

* Complete tests for /api/v1/custodians and /api/v1/custodian-accounts endpoints + Various improvements and fixes

* Mock custodian and more exceptions

* Many more tests + cleanup, moved files to better locations

* More tests

* WIP more tests

* Greenfield API tests complete

* Added missing "Name" column

* Cleanup, TODOs and beginning of Kraken Tests

* Added Kraken tests using public endpoints + handling of "SATS" currency

* Added 1st mocked Kraken API call: GetAssetBalancesAsync

* Added assert for bad config

* Mocked more Kraken API responses + added CreationDate to withdrawal response

* pr review club changes

* Make Kraken Custodian a plugin

* Re-added User-Agent header as it is required

* Fixed bug in market trade on Kraken using a percentage as qty

* A short delay so Kraken has the time to execute the market order and we don't fetch the details too quickly.

* Merged the draft swagger into the main swagger since it didn't work anymore

* Fixed API permissions test

* Removed 2 TODOs

* Fixed unit test

* Remove Kraken Api as it should be separate opt-in plugin

* Flatten namespace hierarchy and use InnerExeption instead of OriginalException

* Remove useless line

* Make sure account is from a specific store

* Proper error if custodian code not found

* Remove various warnings

* Remove various warnings

* Handle CustodianApiException through an exception filter

* Store custodian-account blob directly

* Remove duplications, transform methods into property

* Improve docs tags

* Make sure the custodianCode saved is canonical

* Fix test

Co-authored-by: Wouter Samaey <wouter.samaey@storefront.be>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2022-05-18 14:59:56 +09:00
..
ApiHealthData.cs format 2020-04-30 16:44:27 +02:00
ApiKeyData.cs format 2020-04-30 16:44:27 +02:00
ApplicationUserData.cs Allow Users to be disabled/enabled (#3639) 2022-04-26 21:27:35 +09:00
ApprovePayoutRequest.cs Removing unused usings, readonly fields where possible 2020-06-28 22:07:48 -05:00
AssetPairData.cs Exchange api no kraken (#3679) 2022-05-18 14:59:56 +09:00
ConnectToNodeRequest.cs Removing unused usings, readonly fields where possible 2020-06-28 22:07:48 -05:00
CreateApiKeyRequest.cs Cleaning up bom from cs files 2020-06-28 21:44:35 -05:00
CreateApplicationUserRequest.cs format 2020-04-30 16:44:27 +02:00
CreateCustodianAccountRequest.cs Exchange api no kraken (#3679) 2022-05-18 14:59:56 +09:00
CreateInvoiceRequest.cs Add ability to require refund email from app level (#3013) 2021-10-27 23:32:56 +09:00
CreateLightningInvoiceRequest.cs API: Add description hash to CreateLightningInvoiceRequest (#3559) 2022-03-17 10:15:27 +01:00
CreateOnChainTransactionRequest.cs Run dotnet format (#3244) 2021-12-31 16:59:02 +09:00
CreatePaymentRequestRequest.cs Run dotnet format 2020-06-28 17:55:27 +09:00
CreatePayoutRequest.cs Make Decimal json converter work for other number types 2020-07-29 08:44:52 +02:00
CreatePayoutThroughStoreRequest.cs Allow auto approval of claims for pull payments (#1851) 2022-04-28 09:51:04 +09:00
CreatePullPaymentRequest.cs Allow auto approval of claims for pull payments (#1851) 2022-04-28 09:51:04 +09:00
CreateStoreRequest.cs Run dotnet format 2020-06-28 17:55:27 +09:00
CustodianAccountBaseData.cs Exchange api no kraken (#3679) 2022-05-18 14:59:56 +09:00
CustodianAccountData.cs Exchange api no kraken (#3679) 2022-05-18 14:59:56 +09:00
CustodianAccountResponse.cs Exchange api no kraken (#3679) 2022-05-18 14:59:56 +09:00
CustodianData.cs Exchange api no kraken (#3679) 2022-05-18 14:59:56 +09:00
DepositAddressData.cs Exchange api no kraken (#3679) 2022-05-18 14:59:56 +09:00
EmailSettingsData.cs Add Greenfield Store Email API 2022-03-26 21:46:40 +00:00
GenerateOnChainWalletRequest.cs Run dotnet format (#3244) 2021-12-31 16:59:02 +09:00
GenericPaymentMethodData.cs Run dotnet format (#3244) 2021-12-31 16:59:02 +09:00
GreenfieldAPIError.cs Do not crash on invocie creation error for greenfield (Fix #2111) 2020-12-08 14:47:20 +09:00
GreenfieldPermissionAPIError.cs Run dotnet format (#3244) 2021-12-31 16:59:02 +09:00
GreenfieldValidationError.cs Removing unused usings, readonly fields where possible 2020-06-28 22:07:48 -05:00
InvoiceData.cs resolves Issue #3042 add archive status to invoice response (#3043) 2021-11-01 15:53:33 +09:00
InvoiceExceptionStatus.cs Run dotnet format (#3244) 2021-12-31 16:59:02 +09:00
InvoicePaymentMethodDataModel.cs Test LNUrl Pay payment method information, add doc 2022-02-21 13:22:17 +09:00
LabelData.cs Run dotnet format (#3244) 2021-12-31 16:59:02 +09:00
Language.cs Add misc/permissions to document the hierarchical structure (#2654) 2021-07-08 14:34:10 +09:00
LedgerEntryData.cs Exchange api no kraken (#3679) 2022-05-18 14:59:56 +09:00
LightningAutomatedPayoutSettings.cs Transfer Processors (#3476) 2022-04-24 12:19:34 +09:00
LightningInvoiceData.cs Fix lightning implementation, docs and tests 2020-06-09 17:24:34 +09:00
LightningNetworkPaymentMethodBaseData.cs Run dotnet format (#3244) 2021-12-31 16:59:02 +09:00
LightningNetworkPaymentMethodData.cs Run dotnet format (#3244) 2021-12-31 16:59:02 +09:00
LightningNodeInformationData.cs Removing unused usings, readonly fields where possible 2020-06-28 22:07:48 -05:00
LightningPaymentData.cs API: Add Lightning Payment info endpoint (#3557) 2022-04-12 18:01:58 +09:00
LNURLPayPaymentMethodBaseData.cs Run dotnet format (#3244) 2021-12-31 16:59:02 +09:00
LNURLPayPaymentMethodData.cs Run dotnet format (#3244) 2021-12-31 16:59:02 +09:00
LockUserRequest.cs Allow Users to be disabled/enabled (#3639) 2022-04-26 21:27:35 +09:00
MarketTradeResponseData.cs Exchange api no kraken (#3679) 2022-05-18 14:59:56 +09:00
MarkInvoiceStatusRequest.cs make individual action items 2020-08-26 21:36:31 +09:00
NotificationData.cs GreenField: Notifications API (#2055) 2020-12-11 23:11:08 +09:00
OnChainAutomatedPayoutSettings.cs Transfer Processors (#3476) 2022-04-24 12:19:34 +09:00
OnChainPaymentMethodBaseData.cs Run dotnet format (#3244) 2021-12-31 16:59:02 +09:00
OnChainPaymentMethodData.cs Run dotnet format (#3244) 2021-12-31 16:59:02 +09:00
OnChainPaymentMethodDataWithSensitiveData.cs Run dotnet format (#3244) 2021-12-31 16:59:02 +09:00
OnChainPaymentMethodPreviewResultData.cs GreenField: Store OnChain Payment Method (#2157) 2020-12-23 14:00:38 +09:00
OnChainWalletAddressData.cs Allow Payjoin for wallet receive addresses (#2425) 2021-04-13 12:26:36 +09:00
OnChainWalletFeeRateData.cs GreenField: Add FeeRate To Wallets API (#2375) 2021-04-07 15:16:17 +09:00
OnChainWalletOverviewData.cs Provide more data through OnChain Wallet API (#2420) 2021-04-08 12:43:51 +09:00
OnChainWalletTransactionData.cs Bump NBX (#3607) 2022-04-05 14:46:42 +09:00
OnChainWalletUTXOData.cs Bump NBX (#3607) 2022-04-05 14:46:42 +09:00
OpenLightningChannelRequest.cs Fix lightning implementation, docs and tests 2020-06-09 17:24:34 +09:00
PatchOnChainTransactionRequest.cs Add transaction info PATCH endpoint (#3561) 2022-04-14 13:17:22 +09:00
PayLightningInvoiceRequest.cs Lightning: Allow specifying explicit amount for invoices (#3753) 2022-05-18 14:57:36 +09:00
PaymentRequestBaseData.cs [Greenfield] Fix create/update payment requests expiry field and allow null currency field (Fix #3222) (#3284) 2022-01-11 18:42:44 +09:00
PaymentRequestData.cs Renamed Payment Request "Created" field to "CreatedTime" for consistancy since we already have a breaking change (#3230) 2021-12-23 14:48:10 +01:00
PayoutData.cs Add crypto code for invoice and pull payment payout API response (#3099) 2021-11-15 14:25:59 +09:00
PayoutProcessorData.cs Transfer Processors (#3476) 2022-04-24 12:19:34 +09:00
PermissionMetadata.cs Add misc/permissions to document the hierarchical structure (#2654) 2021-07-08 14:34:10 +09:00
PullPaymentBaseData.cs Allow auto approval of claims for pull payments (#1851) 2022-04-28 09:51:04 +09:00
SendEmailRequest.cs New API endpoint: Send email using store SMTP (#3181) 2022-03-11 10:17:40 +01:00
ServerInfoData.cs Run dotnet format (#3244) 2021-12-31 16:59:02 +09:00
StoreBaseData.cs Run dotnet format (#3244) 2021-12-31 16:59:02 +09:00
StoreData.cs Greenfield: Store Users (#3425) 2022-02-10 14:51:10 +09:00
StoreWebhookData.cs Add Greenfield API 2020-11-13 14:15:03 +09:00
TradeQuoteResponseData.cs Exchange api no kraken (#3679) 2022-05-18 14:59:56 +09:00
TradeRequestData.cs Exchange api no kraken (#3679) 2022-05-18 14:59:56 +09:00
TransactionStatus.cs Run dotnet format (#3244) 2021-12-31 16:59:02 +09:00
UpdateInvoiceRequest.cs GreenField: Update invoice metadata (#2095) 2020-12-12 15:15:34 +09:00
UpdateLightningNetworkPaymentMethodRequest.cs Run dotnet format (#3244) 2021-12-31 16:59:02 +09:00
UpdateNotification.cs GreenField: Notifications API (#2055) 2020-12-11 23:11:08 +09:00
UpdateOnChainPaymentMethodRequest.cs Run dotnet format (#3244) 2021-12-31 16:59:02 +09:00
UpdatePaymentRequestRequest.cs Run dotnet format 2020-06-28 17:55:27 +09:00
UpdateStoreRequest.cs format 2020-04-30 16:44:27 +02:00
WebhookDeliveryData.cs Add Greenfield API 2020-11-13 14:15:03 +09:00
WebhookDeliveryStatus.cs Add Webhooks in store's settings 2020-11-08 15:57:24 +09:00
WebhookEvent.cs Fix typo of webhook events property 2021-04-20 12:36:20 +09:00
WebhookEventType.cs Payment Settled Webhook event (#2944) 2021-10-05 18:10:41 +09:00
WebhookInvoiceEvent.cs Add boolean overPaid to the invoice settled webhook 2021-10-27 14:51:42 +09:00
WithdrawalResponseData.cs Exchange api no kraken (#3679) 2022-05-18 14:59:56 +09:00
WithdrawRequestData.cs Exchange api no kraken (#3679) 2022-05-18 14:59:56 +09:00