/
Frontend Queries, Mutations and Subscriptions

Frontend Queries, Mutations and Subscriptions

 

(Valid for UserApp version 1.5.3)

URL for Playground https://dev.wizwiz.io/graphql

You can know more about GraphQL in Marionette in this video

Queries:

query KYCDocumentTypes { KYCDocumentTypes }
query GetNonCustodialCurrencies { currencies { id name precision icon_url markets(nonCustodialExchangeEnabled: true) { id rate commission_currency base_currency_id minBaseCurrencyAmount base_currency { id name precision icon_url userBalanceEnable currencyPaymentInterfaces(userWithdrawEnabled: true) { type paymentInterface { id title subtitle logoUrl } } } quote_currency { id name precision icon_url userBalanceEnable currencyPaymentInterfaces(userWithdrawEnabled: true) { type paymentInterface { id title subtitle logoUrl } } } quote_currency_id minQuoteCurrencyAmount rate buy_commission buy_max_commission buy_min_commission sell_commission sell_max_commission sell_min_commission enable_non_custodial_exchange swapBaseToQuotePricePrecision swapQuoteToBasePricePrecision } currencyPaymentInterfaces(userDepositEnabled: true) { paymentInterfaceId type paymentInterface { id title logoUrl subtitle blockchain { id name description explorer_address chainId wallet } } userDepositEnable userWithdrawEnable } } }

 

query GetPublicTradesHistory($market: String) { publicTrades(market: $market) { result { price amount createdAt } } }

 

query PublicOrderBook($market: String!){ publicOrderBook(market: $market) { buy { price amount cumulativeAmount } sell { price amount cumulativeAmount } } }

 

query GetMarket($id: String!) { market(id: $id) { id rate enable_trading quote_currency { id precision icon_url name } base_currency { id precision icon_url name } change24 trading_min_price trading_max_price trading_min_amount trading_price_precision trading_amount_precision trading_position marketDynamics { marketId startPrice amount24h lastPrice lowPrice highPrice } } }

 

query GetMarkets { markets { id rate enable_trading quote_currency { id precision icon_url name userBalanceEnable } base_currency { id precision icon_url name userBalanceEnable } change24 isFavorite trading_min_price trading_max_price trading_min_amount trading_price_precision trading_amount_precision trading_position marketDynamics{ marketId startPrice amount24h lastPrice lowPrice highPrice } } }

 

query GetUserOrder($id: String) { userOrder(id: $id) { id status } }

 

query GetMarketDynamics($market: String!) { marketDynamics(market: $market) { startPrice lastPrice amount24h lowPrice highPrice } }

 

query GetUseOrders($market: String, $status: String, $page: Int, $limit: Int) { userOrders(market: $market, status: $status, page: $page, limit: $limit) { result { id market Market { id rate enable_trading quote_currency { id precision icon_url name } base_currency { id precision icon_url name } change24 trading_min_price trading_max_price trading_min_amount trading_price_precision trading_amount_precision marketDynamics { marketId startPrice amount24h lastPrice lowPrice highPrice } } type side status executedAmount executedVolume user { id } amount price executedAmount executedVolume status createdAt } limit total } }

 

query GetUserTradesHistory($market: String) { userTrades(market: $market) { result { price amount createdAt } } }

 

query TradeWalletsData($id: String) { user(id: $id) { currencies { id advancedTradingBalance } } }

 

query Get2FaStatus($id: String) { user(id: $id) { enabled2fa } }

 

query GetUserHistoryById($currencyId: String!) { history( type: "move_to_advanced|move_from_advanced|custodial_withdrawal|custodial_deposit|exchange|deposit|staking_rewards|deposit_reward|trade_reward" page: 1 limit: 4 currencyId: $currencyId ) { result { id createdAt status initiator_type initiator_currency { id precision icon_url precision } initiator_payment_interface { title } initiator_payment_interface_id initiator_amount initiator_fee result_currency { id precision icon_url position } result_payment_interface_id result_amount } } }

 

query GetUserHistory( $currencyId: String $limit: Int $page: Int $type: String $from: String $to: String ) { history( page: $page limit: $limit currencyId: $currencyId type: $type from: $from to: $to ) { result { id createdAt status initiator_type initiator_currency { id precision icon_url precision currencyPaymentInterfaces { type paymentInterfaceId } } initiator_payment_interface { title subtitle } initiator_payment_interface_id initiator_amount initiator_explorer_transaction initiator_txid result_txid initiator_fee result_currency { id precision icon_url position } result_payment_interface_id result_amount } } }

 

query GetUserWallets($id: String) { user(id: $id) { currencies { id name icon_url position precision enabled lightBgColor1 lightBgColor2 darkBgColor1 darkBgColor2 lightTextColor staking_enabled isUnstakingProcess isFavorite markets { id marketDynamics { marketId startPrice amount24h lastPrice lowPrice highPrice } base_currency { id name icon_url balance precision advancedTradingBalance userBalanceEnable } quote_currency { id name icon_url balance precision advancedTradingBalance userBalanceEnable } rate isFavorite minBaseCurrencyAmount minQuoteCurrencyAmount commission_currency buy_commission buy_min_commission buy_max_commission sell_commission sell_min_commission sell_max_commission buy_commission buy_max_commission buy_min_commission sell_commission sell_max_commission sell_min_commission enable_custodial_exchange enabled swapBaseToQuotePricePrecision swapQuoteToBasePricePrecision enable_trading trading_min_amount trading_price_precision trading_amount_precision } } } }
query GetDepositWalletPaymentInterface($id: String!) { currency(id: $id) { currencyPaymentInterfaces { userDepositEnable userDirectDepositEnabled enable id minDirectDepositAmount type paymentInterface { id title logoUrl subtitle } currency { id icon_url } } } }

 

query GetWithdrawWalletPaymentInterface($id: String!) { currency(id: $id) { withdrawPaymentInterfaces { type paymentInterface { id title logoUrl subtitle } currency { id name icon_url } recipients { id data description } recipientSchema minWithdrawAmount maxWithdrawAmount withdrawFee minWithdrawFee maxWithdrawFee maxWithdrawAmount24h withdrawAmount24h } } }
query GetStakingCurrency($id: String!) { stakingCurrency(id: $id) { id staking_enabled staking_period staking_apr last_staking_calc next_staking_calc next_reward_amount locked_balance active_balance min_staking_amount isUnstakingProcess } }
query WalletHistoryKline( $market: String! $interval: String! $timeFrom: Int! $timeTo: Int! ) { kline( market: $market interval: $interval timeFrom: $timeFrom timeTo: $timeTo ) { close low high timestamp volume } }

 

query GetUpdateUser($id: String) { user(id: $id) { id email enabled2fa role email_verified phone_verified profile_verified documents { doc_type doc_number doc_expire url } state token labels { key value scope } createdAt updatedAt phones { id phone verified } profiles { first_name last_name birth address postcode city country } } }

 

query GetRefUser { refUser { id refCode referralsByLevel { level count } } }
query GetApiKeys { apiKeys { id description scope expires token } }

Mutations:

mutation SignIn($email: String, $password: String, $code: String) { login(email: $email, password: $password, code: $code) { id enabled2fa token profiles { first_name last_name } } }
mutation SignUpWithGoogle( $token: String! $code: String $referralId: String ) { signWithGoogle( token: $token code: $code referralId: $referralId ){ token id email } }
mutation SignUp($email: String!, $password: String!, $referralId: String, $locale: String){ signup(email: $email, password: $password, referralId: $referralId, locale: $locale ) }
mutation Logout { logout }
mutation ChangePassword($old_password: String!, $new_password: String!) { changePassword(old_password: $old_password, new_password: $new_password) }

 

mutation UserExchange( $currencyFrom: String!, $currencyTo: String!, $amount: Float!, ){ userExchange( fromCurrencyId: $currencyFrom, toCurrencyId: $currencyTo, amount: $amount ) }
mutation AddPhone($phone: String!) { addPhone(phone: $phone) }
mutation AddProfile($first_name: String!,$last_name: String!,$birth: String!,$address: String!,$city: String!,$country: String!,$postcode: String!) { addProfile(first_name: $first_name, last_name: $last_name, birth: $birth,address: $address,city: $city,country: $country, postcode: $postcode) }
mutation ResendEmailConfirm($email:String!) { resendEmailConfirm(email:$email) }
mutation AddUserDocument($doc_type:String!,$doc_number:String!,$file:Upload!,$doc_expire:String!) { addDocument(doc_type:$doc_type,doc_number:$doc_number,file:$file,doc_expire:$doc_expire) }
mutation MoveFromAdvancedTradingFunds($currencyId: String!, $amount: Float!) { moveFromAdvancedTrading(currencyId: $currencyId, amount: $amount) }
mutation MoveToAdvancedTradingFunds($currencyId: String!, $amount: Float!) { moveToAdvancedTrading(currencyId: $currencyId, amount: $amount) }
mutation CreateNonCustodialRecipient( $paymentInterfaceId: String! $currencyId: String! $data: String! $description: String! ) { createRecipient( paymentInterfaceId: $paymentInterfaceId currencyId: $currencyId data: $data description: $description ) { id } }
mutation InitNonCustodial( $provider: String! $inPaymentInterfaceId: String! $inCurrencyId: String! $amount: Float! $slippage: Float! $beneficiaryId: String! ) { initNonCustodialExternalExchange( provider: $provider inPaymentInterfaceId: $inPaymentInterfaceId inCurrencyId: $inCurrencyId amount: $amount slippage: $slippage beneficiaryId: $beneficiaryId ) }
mutation InitNonCustodialClassic( $inPaymentInterfaceId: String! $inCurrencyId: String! $amount: Float! $beneficiaryId: String! ) { initNonCustodialExchange( inPaymentInterfaceId: $inPaymentInterfaceId inCurrencyId: $inCurrencyId amount: $amount beneficiaryId: $beneficiaryId ) { address encodedAddress redirectUrl } }
mutation AskChangePassword($email: String!) { askChangePassword(email: $email) }
mutation RecoveryPassword($token: String!, $newPassword: String!) { recoveryPassword(token: $token, newPassword: $newPassword) }
mutation CancelOrderAction($id: String!) { cancelOrder(id: $id) }

 

mutation CreateOrder( $market: String! $side: String! $type: String! $price: Float $amount: Float! ) { openOrder( market: $market side: $side type: $type price: $price amount: $amount ) { id status } }

 

mutation Request2FA{ request2FA }

 

mutation TurnOn2FA($code: String!) { turnOn2FA(code: $code) }

 

mutation VerifyEmailToken($token: String!, $isFront: Boolean) { verifyEmail(token: $token, isFront: $isFront) }

 

mutation VerifyUserPhoneNumber($phone:String!,$code:String!){ verifyPhone(phone:$phone,code:$code) }

 

mutation createRecipient($paymentInterfaceId:String!, $currencyId: String!, $data: String!, $description: String!) { createRecipient( paymentInterfaceId: $paymentInterfaceId, currencyId: $currencyId, data: $data, description: $description ) { id } }

 

mutation CreateWithdrawal( $recipient_id: String $amount: Float $code: String $includeFees: Boolean ) { userWithdraw( recipientId: $recipient_id amount: $amount code: $code includeFees: $includeFees ) }

 

mutation ConfirmationConnectWallet($paymentInterfaceId: String,$address: String!){ connectWallet_v1( paymentInterfaceId: $paymentInterfaceId, address: $address) { id } }

 

mutation GenerateDepositAddress( $currencyId: String! $paymentInterfaceId: String! $isDonation: Boolean! ) { generateWallet( currencyId: $currencyId paymentInterfaceId: $paymentInterfaceId isDonation: $isDonation ) { id type paymentInterface { id title logoUrl subtitle } currency { id icon_url } deposit { address encodedAddress redirectUrl depositCommission minDepositCommission maxDepositCommission minDepositAmount maxDepositAmount } } }

 

mutation getUrlWalletConnect{ getWalletConnectURI_v1 }

 

mutation SendDepositRequest($paymentInterfaceId: String!,$address: String!,$currencyId: String!,$amount: Float!){ userDirectDeposit( paymentInterfaceId:$paymentInterfaceId, type: DIRECT_DEPOSIT, address: $address, currencyId: $currencyId, amount:$amount ) }

 

mutation FiatGenerateWallet( $currencyId: String! $paymentInterfaceId: String! $isDonation: Boolean! ) { generateWallet( currencyId: $currencyId paymentInterfaceId: $paymentInterfaceId isDonation: $isDonation ) { deposit { address encodedAddress } } }
mutation CreateCurrencyState($currencyId: String!, $amount: Float!) { createStake(currencyId: $currencyId, amount: $amount) }
mutation CancelCurrencyState($currencyId: String!) { cancelStake(currencyId: $currencyId) }
mutation CreateUserApiKey( $description: String $expires: Int! $scope: String $otp_code: String ) { createApiKey( description: $description expires: $expires scope: $scope otp_code: $otp_code ){ id description scope expires token } }
mutation DeleteApiKeyAction($id: String! $otp_code: String) { deleteApiKey(id: $id otp_code: $otp_code) }
mutation CancelAllOrders($market: String!) { cancelAllOrders(market: $market) }

Subscriptions:

subscription PublicTradesSubscription($market: String!){ publicTrades(market: $market) { price amount createdAt } }

 

subscription MarketDynamics($market: String){ marketDynamics(market: $market){ marketId startPrice lastPrice amount24h lowPrice highPrice } }

 

subscription PublicDiffOrderBookSubscription($market: String!){ publicDiffOrderBook(market: $market){ buy { price amountDiff } sell { price amountDiff } } }

 

subscription PublicFullOrderBookSubscription($market: String!){ publicFullOrderBook(market: $market) { buy { price amount cumulativeAmount } sell { price amount cumulativeAmount } } }

 

subscription PrivateOrdersSubscription($market:String!,$token: String!){ privateOrders(market: $market, token:$token){ id market type side status executedAmount executedVolume user { id } amount price executedAmount executedVolume status createdAt } }

 

subscription GetPrivateTrades($market: String,$token: String!) { privateTrades( market: $market, token: $token ){ id amount price side role } }

 

subscription MarketRate($market: String!){ marketRate(market: $market){ market, rate, ts } }

 

subscription UserAllBalance($token: String!) { userAllBalance(token: $token) { currencyId balance lockedBalance advancedTradingBalance advancedTradingLockedBalance withdrawLockedBalance stakingLockedBalance activeStakingBalance ts } }

 

Related content