Jump to content
Dan

Guide to using the Primedice API

Recommended Posts

7 hours ago, TERMSERROR said:

Hey! how to use insomnia and where to put JWT authentication Screenshots will be more helpful 

thanks :)

Paddyspub was able to demonstrate with the screenshot above. Hope that answers your question!

Share this post


Link to post
Share on other sites
On 15/11/2019 at 14:18, Dan said:

{
  user {
    depositList {
      amount
      currency
      walletFee
      status
      createdAt
    }
  }
}

{
  user {
    withdrawalList {
      amount
      currency
      status
      createdAt
    }
  }
}

 

image.thumb.png.0a29d0b78b309983589c8f51090cb5ee.png

What am i missing ?
As i tried this and this worked 

image.thumb.png.89390ca1b9822a13807b221893f19656.png

 

image.thumb.png.188fb6fca5725d1e434ddf07b1eb29eb.png

Share this post


Link to post
Share on other sites
5 hours ago, Saaho2019 said:

image.thumb.png.0a29d0b78b309983589c8f51090cb5ee.png

What am i missing ?
As i tried this and this worked 

image.thumb.png.89390ca1b9822a13807b221893f19656.png

 

image.thumb.png.188fb6fca5725d1e434ddf07b1eb29eb.png

You probably use the wrong token. You need to use token from Local Storage, not PD interface. These queries works fine for me

{ user { withdrawalList { amount currency status createdAt } } } - correct answer @Dan walletFee is not for wdList

Edited by paddyspub

Share this post


Link to post
Share on other sites
16 hours ago, paddyspub said:

@Dan can you pls provide a query which return user status " vip / or not" i have found statistic  but i don't know what param i need to use. 

The vip status is not something that we wish to make publicly available to our players.

Share this post


Link to post
Share on other sites
11 hours ago, paparoll said:

Hi, is it possible to get our own and other users profit statistics through the API since it disappeared from the website?

Thanks

{
  user {
    statistic {
      game
      bets
      wins
      losses
      currency
      profitAmount
    }
  }
}

 

Share this post


Link to post
Share on other sites
On 22/12/2019 at 10:39, Noeprellik1 said:

Is it possible to do withdrawal using API? 

As far as I know, everything is possible via API, that you can do on the official site, since the site uses the API as well.

Last time I checked this was the withdrawal mutation:

mutation CreateWithdrawalMutation(
    $address: String!,
    $amount: Float!,
    $currency: CurrencyEnum!,
    $tfaToken: String,
    $oauthToken: String
) {
    createWithdrawal(currency: $currency, address: $address, amount: $amount, tfaToken: $tfaToken, oauthToken: $oauthToken) {
        id
        amount
        refFee
        currency
        hash
        address
        reference {
            ... on User {
                id
                balances {
                    available {
                        amount
                        currency
                    }
                    vault {
                        amount
                        currency
                    }
                }
            }
        }
    }
}

 

Share this post


Link to post
Share on other sites
Posted (edited)

Hi @Dan, could you show me how to query balances of "btc" wallet?

I tried add (currency: "btc") but not work :(

{
  user {
    id
    name
    balances {
      available (currency: "btc"){
        currency
        amount
      }
    }
  }
}

 

{
  "errors": [
    {
      "path": [],
      "message": "Unknown argument \"currency\" on field \"UserBalance.available\".",
      "errorType": "graphqlError",
      "data": null
    }
  ]
}

 

Edited by MisterCurly

Share this post


Link to post
Share on other sites

Is API's still working please?

I tried to use the provided endpoint (https://api.primedice.com/graphql) but that address simply return a with page with this message 'GET query missing.' ...

thus, it don't show the graphql IDE, like graphiQL, where I could get also the schema.

And also using another IDE, it return error, saying to check the correctness of the URL address (endpoint).

So, is changed the endpoint address? or something else changed?

How to use primedice API's at today please?

 

Share this post


Link to post
Share on other sites

Hi Dan, thank you for starting this thread - it is very helpful.

Lately it seems that the bet archives located at https://www.primedice.com/transactions/archive/ have been missing multiple days and large numbers of bets.  I have asked support repeatedly about this and they tell me they are unable to restore missing bet archives.

In your initial post, you provided a GraphQL query titled "Bet List Query (lookup a players bet history)  [Unrestricted]".  This is a helpful query, but it is limited to only returning 1000 bets total (offset:1000).

Given that the bet archives are missing bets, would it be possible to remove the 1000 bet limit so that we can see our entire bet archive and retrieve the missing bets?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×