MCPcopy Create free account
hub / github.com/ccxt/ccxt / fetchAccountSettings

Method fetchAccountSettings

js/src/pacifica.js:717–739  ·  view source on GitHub ↗

* @method * @name pacifica#fetchAccountSettings * @description fetch account's market settings. Settings are cached for walletAddress. To refresh the cache, call loadAccountSettings with refresh=true * @see https://docs.pacifica.fi/api-documentation/api/rest-api/account/get-account-se

(params = {})

Source from the content-addressed store, hash-verified

715 * @returns {object} Dict repacked from list by symbol key
716 */
717 async fetchAccountSettings(params = {}) {
718 let userAccount = undefined;
719 [userAccount, params] = this.handleOriginAndSingleAddress('fetchAccountSettings', params);
720 const request = {
721 'account': userAccount,
722 };
723 const response = await this.publicGetAccountSettings(this.extend(request, params));
724 // {
725 // "success": true,
726 // "data": [
727 // {
728 // "symbol": "WLFI",
729 // "isolated": false,
730 // "leverage": 5,
731 // "created_at": 1758085929703,
732 // "updated_at": 1758086074002
733 // }
734 // ],
735 // "error": null,
736 // "code": null
737 // }
738 return this.parseAccountSettings(this.safeList(response, 'data', []));
739 }
740 async loadAccountSettings(refresh = false, params = {}) {
741 let settings = this.handleOption('loadAccountSettings', 'settings', undefined);
742 if ((settings === undefined) || (refresh === true)) {

Callers 3

fetchLeverageMethod · 0.95
loadAccountSettingsMethod · 0.95
fetchMarginModeMethod · 0.95

Calls 5

parseAccountSettingsMethod · 0.95
extendMethod · 0.45
safeListMethod · 0.45

Tested by

no test coverage detected