Rev 5. December 31, 2013

Bitcoin Video Casino API

GETTING STARTED

FEATURES

ACCOUNT API

Create a new account

Get account balance

Get Bitcoin address

Withdraw funds from account

Change your display name

VIDEO POKER API

Paytables and Hand Evaluations

Get the payouts for each Pay Table

Create a new random server seed

Deal a new game of video poker

Hold final cards

Start a round of double down

Select the double down card to play

BLACKJACK API

LUCKY 7’s PROGRESSIVE GAME

Get the Blackjack Ruleset

Create a new random server seed

Deal a new game of Blackjack

Stand on a hand

Hit on a hand

Split on a hand

Double on a hand

Take insurance on the dealer’s showing Ace

When finished == true

EXAMPLES

ROULETTE API

LUCKY 0’s PROGRESSIVE GAME

ROULETTE BETS

Get the Roulette Ruleset

Create a new random server seed

Play a game of Roulette

CRAPS API

LUCKY SIXES PROGRESSIVE GAME

CRAPS BETS

Create a new random server seed

Play a game of Craps

Pick up chips off table

KENO API

Create a new random server seed

Play a new game of Keno

SLOTS API

Get the Slots Ruleset

Create a new random server seed

Play a new game of Slots

DICE API

Get the Dice Ruleset

Create a new random server seed

Play a new game of Dice

CHAT API

Post a Chat message

Get a list of currently online players

Get Stats about a Player

LEADERBOARD API

Request the leaderboards

Request your recently played games

GAME UPDATE API

Poll server for game updates

Chatlog

Leaderboard

PROJECTS

dooglas’s PokerBot

GETTING STARTED

Bitcoin Video Casino provides a simple interface for application developers. You can use our API to create apps that play Video Poker, Blackjack, and Roulette. With our API you can also access the chat and leaderboard features of Bitcoin Video Casino.

The basic URL for the GET requests is always https://bitcoinvideocasino.com/. Responses are returned in the JSON format.

A sample python library which includes a basic API demonstration is available at https://bitbucket.org/tbak/bitcoin-video-casino-python-library. If you create libraries in different languages or wish to share your project that you’ve created with the Bitcoin Video Casino API, please let us know about it at admin@bitcoinvideocasino.org and we will include them in this document.

If you have any questions, please feel free to contact us at admin@bitcoinvideocasino.org.  We look forward to seeing new projects based on the Bitcoin Video Casino API!

FEATURES

All communication between your application and our servers must be over the HTTPS protocol.  Our servers will do nothing but redirect your requests if they’re made over HTTP.  By issuing requests over HTTP, you risk exposing account keys.  All communication must happen over a secure network.  All results are returned in JSON format.

Our API does not require that you get prior permission from us.  Just use it.  You don’t need an API key to create an app, poker bot, demo, etc.  You can just get started right away.

As with our Web interface, deposits and withdrawals are instant.  You can get notification of deposits via the /account/balance call and can make withdrawals from /account/withdraw.

You can earn Bitcoins from your referral code.  In your application, just pass in your referral parameter when you create new accounts.

Most JSON calls return a “time” key, which is the time, in milliseconds, that it took the server to complete the request.  If the server is taking a long time to complete requests, it would be nice if your application would throttle the speed at which it is issuing requests.  See http://en.wikipedia.org/wiki/Exponential_backoff for our recommended backoff method.

While Bitcoin values are sometimes shown and used as strings (“3.141” BTC), the integer values are actually in Satoshis.  The API below notes when to use Satoshis and when to use the String representation.  To get the Bitcoin amount from the Satoshi amount, divide the number by 100,000,000 (the number of Satoshis in 1 BTC). So if intbalance = 2000000, then the Bitcoin balance is 2000000/100000000 = 0.02 BTC.

Note: The account_key parameter for all API calls is now sent as a cookie header value, not as a GET parameter. (Cookie: account_key=xxxxxxxxxx;) You should never have to send account_key as a GET parameter for any API calls.

ACCOUNT API

Create a new account

URL

https://bitcoinvideocasino.com/account/new

Description

Create a new Bitcoin Video Casino account key. For most other service calls, this account key is required.

Request

GET https://bitcoinvideocasino.com/account/new

Request Parameters

r optional You can set this value to your referral ID to generate Bitcoins via your referral account. See https://bitcoinvideocasino.com/referral for our Referral Program.

Response

{"account_key": "21fa81ad3e520aa8c5a2a3214ccfe70e", "time": 0}

account_key your new account key

Get account balance

URL

https://bitcoinvideocasino.com/account/balance

Description

Ask the server how many Bitcoins belong to your account. You can play the games as soon as a deposit has been discovered by our system. A new deposit does not require any confirmations before you can play.

Request

GET https://bitcoinvideocasino.com/account/balance?account_key=21fa81ad3e520aa8c5a2a3214ccfe70e

Request Parameters

account_key The account key for the account you wish to access. (send this as a cookie header)

Response

{"notify_transaction": null, "intbalance": 2100000, "sender_address": "1F7drJM4eDRVzyUAZnL1BKKRiaEfkVkFpf", "time": 2, "unconfirmed": false, "shutdown_time": null}

notify_transaction If not null, then a new deposit has just arrived. notify_transaction will contain a dictionary of 3 additional values. The value will only be non-null the first time you call /account/balance. The next time, it will be null again.  If null, no new deposit have arrived since the last time you called /account/balance.

    amount - The amount of Bitcoins received (string)

    intamount - The number of satoshis deposited (integer)

    txid - The transaction ID

intbalance Current balance in Satoshis.

sender_address The address that the system thinks is the originator of your first deposit.  Warning: The address provided for you is determined based on the anonymous transaction information from the Bitcoin network, so it is NOT always possible to determine the exact sending address. Please verify this address before withdrawing your Bitcoins to it! Please first attempt a minimum withdrawal -- 0.02 BTC -- before withdrawing large amounts to this address!

unconfirmed If true, then there is at least one deposit that still need to be confirmed. You can first withdraw Bitcoins when all deposits have been confirmed. If false, then all deposits have been confirmed.

shutdown_time If the server will be shutting down for maintenance, this value will be the time in seconds until server shutdown.  Otherwise, null, if no server maintenance is planned.

Get Bitcoin address

URL

https://bitcoinvideocasino.com/account/bitcoinaddress

Description

Ask the server for a Bitcoin address used to fund your account. You can play games as soon as a deposit has been discovered by our system.

Request

GET https://bitcoinvideocasino.com/account/bitcoinbalance?account_key=21fa81ad3e520aa8c5a2a3214ccfe70e

Request Parameters

account_key The account key for the account you wish to access (send this as a cookie header)

Response

{"time": 0, "address": "1BYtnor3pRyxZGvEhsSMAyt9yotojr2841"}

address The Bitcoin address to send Bitcoins to in order to fund your account.

Withdraw funds from account

URL

https://bitcoinvideocasino.com/account/withdraw

Description

Withdraw Bitcoins from your account to the provided address.

Request

GET https://bitcoinvideocasino.com/account/withdraw?account_key=21fa81ad3e520aa8c5a2a3214ccfe70e&address=1Lvk2MEvPcdjgFzAVvuvoMkP2gPdK787kV&intamount=2000000

Request Parameters

account_key The account key for the account you wish to access (send this as a cookie header)

address the bitcoin address you would like the Bitcoins sent to

intamount the amount of bitcoins to withdraw, in Satoshis

Response

On success,

{"intamount": 1900000, "time": 1250, "result": true, "address": "1Lvk2MEvPcdjgFzAVvuvoMkP2gPdK787kV"}

result This value will be true if the bitcoins were successfully sent to the provided address.

intamount The amount that was actually sent (this is the amount you requested minus the withdrawal fee), in Satoshis

address The address the bitcoins were sent to.

On failure,

{"reason": "amount_too_small", "result": false, "time": 0}

result This value will be false in the event of an error

reason One of the following errors:

  • amount_too_small - You specified a withdrawal amount less than the minimum required.
  • balance - You have an insufficient balance for the specified amount.
  • pending_transactions - You must wait for all pending transactions to confirm before withdrawing.
  • bad_address - The address you provided was an invalid Bitcoin address.
  • shutting_down - The system is in the process of shutting down and withdrawals cannot be made.
  • internal_error - Some unknown error happened. Please contact admin@bitcoinvideocasino.com

Change your display name

URL

https://bitcoinvideocasino.com/account/rename

Description

You can change the name that other player see when you are listed in the chat users list, leaderboards, etc.

Request

GET https://bitcoinvideocasino.com/account/rename?account_key=21fa81ad3e520aa8c5a2a3214ccfe70e&player_ident=MyNewName

Request Parameters

account_key The account key for the account name you wish to change (send this as a cookie header)

player_ident  The new player name you wish to use.

Response

On success,

{"player_ident": "NewName", "result": true, "time": 47}

player_ident your new player_ident

On error,

{"error": "error_code", "time": 0}

error One of the following error codes:

  • length - Character names must be tween 3 and 10 characters long.
  • characters - Only A-Za-z0-9_-[]<>@ are valid name characters.
  • balance - You must have a non-zero balance to change your name.
  • taken - You must choose a unique name.

VIDEO POKER API

Paytables and Hand Evaluations

Video Poker supports 7 pay tables (variations on Video Poker), and each table has it’s own hand evaluations.  The table below lists those pay tables and their hand evaluations.

ID

Paytable

Hand Evaluations

0

Jacks or Better

ID

Hand Eval

0

Nothing

1

One Pair (Jacks or Better)

2

Two Pair

3

3 of a Kind

4

Straight

5

Flush

6

Full House

7

4 of a Kind

8

Straight Flush

9

Royal Flush

1

Tens or Better

ID

Hand Eval

0

Nothing

1

One Pair (Tens or Better)

2

Two Pair

3

3 of a Kind

4

Straight

5

Flush

6

Full House

7

4 of a Kind

8

Straight Flush

9

Royal Flush

2

Bonus Poker

ID

Hand Eval

0

Nothing

1

One Pair (Jacks or Better)

2

Two Pair

3

3 of a Kind

4

Straight

5

Flush

6

Full House

7

4 of a Kind with 5 through King kicker

8

4 of a Kind with 2 through 4 kicker

9

4 Aces

10

Straight Flush

11

Royal Flush

3

Double Bonus Poker

ID

Hand Eval

0

Nothing

1

One Pair (Jacks or Better)

2

Two Pair

3

3 of a Kind

4

Straight

5

Flush

6

Full House

7

4 of a Kind with 5 through King kicker

8

4 of a Kind with 2 through 4 kicker

9

4 Aces

10

Straight Flush

11

Royal Flush

4

Double Double Bonus Poker

ID

Hand Eval

0

Nothing

1

One Pair (Jacks or Better)

2

Two Pair

3

3 of a Kind

4

Straight

5

Flush

6

Full House

7

4 of a Kind with 5 through King kicker

8

4 of a Kind with 2 through 4 kicker

9

4 Aces

10

4 of a kind twos through fours with Ace through 4 kicker

11

4 Aces with two through four kicker

12

Straight Flush

13

Royal Flush

5

Deuces Wild Poker

ID

Hand Eval

0

Nothing

1

3 of a Kind

2

Straight

3

Flush

4

Full House

5

4 of a Kind

6

Straight Flush

7

5 of a Kind

8

Wild Royal Flush

9

4 Twos

10

Natural Royal Flush

6

Bonus Deluxe Poker

ID

Hand Eval

0

Nothing

1

One Pair (Jacks or Better)

2

Two Pair

3

3 of a Kind

4

Straight

5

Flush

6

Full House

7

4 of a Kind

8

Straight Flush

9

Royal Flush

Get the payouts for each Pay Table

URL

https://bitcoinvideocasino.com/videopoker/paytables

Description

Request a listing of all the paytables for Video Poker.

Request

GET https://bitcoinvideocasino.com/videopoker/paytables

Request Parameters

None

Response

{"result": [[[0, 1, 2, 3, 4, 6, 9, 25, 50, 250], [0, 2, 4, 6, 8, 12, 18, 50, 100, 500], [0, 3, 6, 9, 12, 18, 27, 75, 150, 750], [0, 4, 8, 12, 16, 24, 36, 100, 200, 1000], [0, 5, 10, 15, 20, 30, 45, 125, 250, 4000]], [[0, 1, 2, 3, 4, 5, 6, 25, 50, 250], [0, 2, 4, 6, 8, 10, 12, 50, 100, 500], [0, 3, 6, 9, 12, 15, 18, 75, 150, 750], [0, 4, 8, 12, 16, 20, 24, 100, 200, 1000], [0, 5, 10, 15, 20, 25, 30, 125, 250, 4000]], [[0, 1, 2, 3, 4, 5, 8, 25, 40, 80, 50, 250], [0, 2, 4, 6, 8, 10, 16, 50, 80, 160, 100, 500], [0, 3, 6, 9, 12, 15, 24, 75, 120, 240, 150, 750], [0, 4, 8, 12, 16, 20, 32, 100, 160, 320, 200, 1000], [0, 5, 10, 15, 20, 25, 40, 125, 200, 400, 250, 4000]], [[0, 1, 1, 3, 5, 7, 9, 50, 80, 160, 50, 250], [0, 2, 2, 6, 10, 14, 18, 100, 160, 320, 100, 500], [0, 3, 3, 9, 15, 21, 27, 150, 240, 480, 150, 750], [0, 4, 4, 12, 20, 28, 36, 200, 320, 640, 200, 1000], [0, 5, 5, 15, 25, 35, 45, 250, 400, 800, 250, 4000]], [[0, 1, 1, 3, 4, 6, 9, 50, 80, 160, 160, 400, 50, 250], [0, 2, 2, 6, 8, 12, 18, 100, 160, 320, 320, 800, 100, 500], [0, 3, 3, 9, 12, 18, 27, 150, 240, 480, 480, 1200, 150, 750], [0, 4, 4, 12, 16, 24, 36, 200, 320, 640, 640, 1600, 200, 1000], [0, 5, 5, 15, 20, 30, 45, 250, 400, 800, 800, 2000, 250, 4000]], [[0, 1, 2, 3, 4, 4, 10, 15, 25, 200, 250], [0, 2, 4, 6, 8, 8, 20, 30, 50, 400, 500], [0, 3, 6, 9, 12, 12, 30, 45, 75, 600, 750], [0, 4, 8, 12, 16, 16, 40, 60, 100, 800, 1000], [0, 5, 10, 15, 20, 20, 50, 75, 125, 1000, 4000]], [[0, 1, 1, 3, 4, 6, 8, 80, 50, 250], [0, 2, 2, 6, 8, 12, 16, 160, 100, 500], [0, 3, 3, 9, 12, 18, 24, 240, 150, 750], [0, 4, 4, 12, 16, 24, 32, 320, 200, 1000], [0, 5, 5, 15, 20, 30, 40, 400, 250, 4000]]], "time": 0}

result The list of paytables. Each paytable is a list of 5 rows, each row consisting of least to best hands.   Example is the Jacks or better table:

               [ [0, 1,  2,  3,  4,  6,  9,  25,  50,  250],

               [0, 2,  4,  6,  8, 12, 18,  50, 100,  500],

               [0, 3,  6,  9, 12, 18, 27,  75, 150,  750],

               [0, 4,  8, 12, 16, 24, 36, 100, 200, 1000],

               [0, 5, 10, 15, 20, 30, 45, 125, 250, 4000] ]

First row is for betting one credit. Second row is for betting two credits, and so on.  The first column is hand_eval 0 (Nothing) up through the right column hand_eval 9 (Royal Flush in Jacks or Better).  

Create a new random server seed

URL

https://bitcoinvideocasino.com/videopoker/reseed

Description

Request a new server seed for Video Poker.  The server seed hash returned by this service call must be included in the call to /videopoker/deal. This service call is required to ensure that all games played are provably fair. After the first game has been played, the next server seed hash will automatically be returned at the end of the game, from the /videopoker/hold service call.

Request

GET https://bitcoinvideocasino.com/videopoker/reseed?account_key=21fa81ad3e520aa8c5a2a3214ccfe70e

Request Parameters

account_key The account key for the account you wish to access (send this as a cookie header)

Response

{"server_seed_hash": "df5633c2a214e7c1e27fd43e8ddf8e47be39fe2c4819d38804efd6b85076347a", "result": true, "time": 2}

result Always true

server_seed_hash The SHA-256 hash of the server seed for the next hand of Video Poker.

Deal a new game of video poker

URL

https://bitcoinvideocasino.com/videopoker/deal

Description

Begin a new Video Poker game. The appropriate amount of credits will be subtracted from your account, and a new set of cards will be returned.

Request

GET https://bitcoinvideocasino.com/videopoker/deal?bet_size=1&paytable=0&account_key=21fa81ad3e520aa8c5a2a3214ccfe70e&server_seed_hash=37a99d19bb5ffce6fd2f18630cd035acc4493c0426c6ef621d8ff3d7e3c4e222&client_seed=279267473&credit_btc_value=100000

Request Parameters

account_key The key to the account you want to play the game with (send this as a cookie header)

bet_size The number of credits to spend on this game: 1, 2, 3, 4 or 5

paytable The paytable of the game mode you would like to use.  See Paytables.

server_seed_hash The server seed hash that was returned from a call to /videopoker/reseed. It can also be the next server seed hash that was returned from /videopoker/hold.

client_seed A random 32 character alphanumeric string, provided by you, that will be used when shuffling the cards.

credit_btc_value The size of 1 credit in this game, in Satoshis.  This value can be 100000 (0.001 BTC), 500000 (0.005 BTC), or 1000000 (0.01 BTC).

Response

On Success,

{"deal_hash": "ff302d3b142fbc8caaeeeecd85b4504bc791e533f7b76733f5de3d1eb8f66726", "time": 45, "hand_eval": 2, "intbalance": 2300000, "cards": ["7s", "8s", "8c", "7d", "3d"], "game_id": "8a9956e62f2f5a17160f056ea008b1ae", "shutdown_time": null, "progressive_jackpot": 449304, "unique_id": 264934}

deal_hash A hash of the deck used in video poker.  The source to the hash includes the game seed. In /videopoker/hold the deal source will be given to you for verification.

hand_eval The initial hand evaluation of your dealt cards. This value depends on the paytable in play.

intbalance Your balance after credits for this game have been deducted.

cards Your initial 5 cards for this game.

game_id The primary unique ID for this game.  This ID will need to be included in further game actions.

progressive_jackpot The current value of the progressive jackpot.

shutdown_time As with /account/withdraw, if the server is going down for mantenance, this value will be the time in seconds until the server shuts down.

unique_id Another unique ID for this game, not necessarily useful for API programmers.  This value is unique only within Video Poker games.

On Error,

{"time": 4, "error": "need_seed"}

error This value will be present and will be one of the following values:

  • shutting_down - You cannot play any games as the server is about to shut down.
  • need_seed - The value provided in server_seed_hash is old or invalid. You should call /videopoker/reseed again and retry dealing.
  • invalid credit_btc_value - You specified an invalid value for the credit size.
  • insufficient_funds - You do not have enough Bitcoins to play this game on this bet size.

Hold final cards

URL

https://bitcoinvideocasino.com/videopoker/hold

Description

After calling /videopoker/deal, the user is presented with cards. The user can now hold any of these cards in order to get replacement cards. After the call to /videopoker/hold, the user will get replacement cards and the game will be over. The user will be awarded credits to his account if he got a winning hand.

Request

GET https://bitcoinvideocasino.com/videopoker/hold?game_id=8a9956e62f2f5a17160f056ea008b1ae&holds=11110&account_key=21fa81ad3e520aa8c5a2a3214ccfe70e

Request Parameters

account_key The account key that you used to start the game. (send this as a cookie header)

game_id The game ID returned in the result to /videopoker/deal

holds A five character string of 0s and 1s, indicating with cards to hold. A ‘1’ indicates that you wish to hold onto that card. The string is read left to right, such that the first digit indicates whether or not to hold the first card, the second to hold the second card, and so on.

Response

{"double_down_server_seed_hash": "8d48dabf0550746f5897a8c4a4bfae631bc51a6583f076381b3ee63408dcf7af", "hand_eval": 2, "btc_prize": "0.002", "time": 9, "game_seed": "drA1SghJ1tLSfxTgeErX3RgWYMU6GYub5fJUtTLGRp9y279267473", "btc_bet": "0.001", "client_seed": "279267473", "progressive_win": 0, "deal_hash_source": "(7s8s8c7d3d2hjs3h7cjc4hkhahkstsqd4sjhas9sadkd2d6skc6c3cqc6d5d5s2s9d2ctcjd4c8d3sqhth9c5h5c9h8hac6htdqs7h4d)(drA1SghJ1tLSfxTgeErX3RgWYMU6GYub5fJUtTLGRp9y279267473)", "prize": 2, "server_seed_hash": "31620bda9d1ebebc1fb3d6bdbe71d46e6da3c04bc566cb35e53b5b600886e4e5", "intbalance": 2500000, "cards": ["2h"], "unique_id": 264934}

game_seed This is the seed used to shuffle the deck.  Your client_seed passed in /videopoker/deal will always be at the end of this string.

client_seed This was the seed you passed in /videopoker/deal.  The server returns the value so that you can verify it was correct.

deal_hash_source This is the string that was used to provide the SHA-256 hash deal_hash in the /videopoker/deal call.

cards An array indicating the new cards that you were dealt to replace the cards that were not held.

hand_eval The server’s evaluation of your resulting hand.

intbet The amount you bet in Bitcoins, in Satoshis.

prize The prize you won in credits.

progressive_win If you won the progressive jackpot, this value will be set to your winnings, in Satoshis.

double_down_server_seed_hash If you are allowed to double down on this game, this value will be non-null.  Save this value and pass it to /videopoker/double_dealer to play a round of double down.

server_seed_hash This will be the server seed to the next game of video poker, so that you do not need to issue /videopoker/reseed after every game.

intbalance Your balance after your prize has been added to your account.

unique_id The same unique ID returned from /videopoker/deal.

Start a round of double down

URL

https://bitcoinvideocasino.com/videopoker/double_dealer

Description

You can only play double dealer if the server provides you a double_down_server_seed_hash key at the end of a regular video poker hand.  You are welcome to play double dealer up to three times, as long as you keep winning.

Request

GET https://bitcoinvideocasino.com/videopoker/double_dealer?game_id=8a9956e62f2f5a17160f056ea008b1ae&account_key=21fa81ad3e520aa8c5a2a3214ccfe70e&client_seed=970366928&level=0&server_seed_hash=8d48dabf0550746f5897a8c4a4bfae631bc51a6583f076381b3ee63408dcf7af

Request Parameters

account_key The account key that you used to start the game. (send this as a cookie header)

game_id the game ID that for the game that you would like to play double dealer on.

client_seed The client_seed you would like the server to use when shuffling.

level Must be the current level of the double dealer you wish to play.  Start at 0, then increment by 1 every time you win.  Must be 0, 1, or 2.

server_seed_hash This is the hash value provided to you in /videopoker/hold called double_down_server_seed_hash.

Response

{"deal_hash": "e41957a316d0f968f98889068698fdb424704963c8141c30e296e05e75633c3b", "dealer_card": "8d", "time": 121, "intbalance": 2300000}

deal_hash As with /videopoker/deal, this is a SHA-256 hash of the shuffled cards that are used to deal.

dealer_card The card the dealer is showing.  You must beat the dealer (or tie) in order to continue on to the next double dealer level.

intbalance Your Bitcoin balance in Satoshis after your bet is deducted.

Select the double down card to play

URL

https://bitcoinvideocasino.com/videopoker/double_pick

Description

You finish the double dealer game by issuing /videopoker/double_pick.  You must pick one of four cards, the server will tell you what card you got and whether you won the double down game.

Request

GET https://bitcoinvideocasino.com/videopoker/double_pick?game_id=8a9956e62f2f5a17160f056ea008b1ae&account_key=21fa81ad3e520aa8c5a2a3214ccfe70e&level=0&hold=1

Request Parameters

account_key your account key. (send this as a cookie header)

game_id the original game_id (from /videopoker/deal) that you’re playing this double down on.

level Must be the current level of the double dealer you wish to play.  Start at 0, then increment by 1 every time you win.  Must be 0, 1, or 2.

hold the card that you wish to hold. Note that the dealer takes up position 0 in the deck. Therefore, the only valid numbers for hold are 1, 2, 3 and 4 since there are four cards you can choose from.

Response

If you win (or tie):

{"deal_hash_source": "(jsqs2dqcah8ckdjdtstc7d6s3c8d2hqdjh4h7sacad5s7c2s6d9h7h9d3std8hkc2c9s4cjc6c5h8skh3d9c6hqh3h4d4sksth5c5das)(cfroAHu6fUqpeUbi4TB12MXvT8LJZTefu1bMjF7oA7DB753423833)", "prize": 2, "intbalance": 2500000, "double_down_server_seed_hash": "f70131348cd29d10db36f74b6d46504f06d88bacd995422061fdfb34f5224c5e", "time": 25, "game_seed": "cfroAHu6fUqpeUbi4TB12MXvT8LJZTefu1bMjF7oA7DB753423833", "cards": ["js", "qs", "2d", "qc", "ah"], "client_seed": "753423833"}

If you lose:

{"deal_hash_source": "(8d6d7sjsadqhqd9d9sjd3sth3d8c5djc3c2h9ctc7h6c3h8s4c5s4djhkc4sqc7cks5h6hkhaststdac7d2c5ckd4h2d2sqs6s8hah9h)(9ERvzKr4V15G6UhUkW2vCv8FscVr2Ask1Kw3AznxhaC8970366928)", "prize": 0, "intbalance": 2300000, "double_down_server_seed_hash": null, "time": 4, "game_seed": "9ERvzKr4V15G6UhUkW2vCv8FscVr2Ask1Kw3AznxhaC8970366928", "cards": ["8d", "6d", "7s", "js", "ad"], "client_seed": "970366928"}

game_seed This is the game seed used to shuffle the cards for this game.

client_seed The server returns your specified client_seed for your verification.

deal_hash_source As with /videopoker/hold, this is the source string used to generate the deal_hash key from /videopoker/double_dealer.

prize Your winnings from playing double dealer, in credits.

intbalance Your Bitcoin balance after the prize from this game is added, in Satoshis.

double_down_server_seed_hash If you won this round, this value will be non-null and you must use this key to start the next level of double down.

cards The set of 5 cards (first card is the dealer card) that are dealt for this game.

BLACKJACK API

LUCKY 7’s PROGRESSIVE GAME

On every Blackjack game played, you can wager an additional side bet to play the Lucky 7’s progressive jackpot game.  These are the Lucky 7’s progressive_hand values are:

progressive_hand

Name

0

Nothing

1

One Seven

2

Two Unsuited Sevens

3

Two Suited Sevens

4

Three Unsuited Sevens

5

Three Suited Sevens

6 or -1

Three Diamond Sevens

Get the Blackjack Ruleset

URL

https://bitcoinvideocasino.com/blackjack/ruleset

Description

You can at any time figure out which rules are in effect for Blackjack.  These rules, in effect, will rarely change.  We reserve the right to adjust the rules to accommodate any odds changes that may be required in the future, however, we anticipate that the current rules are here to stay.

Request

GET https://bitcoinvideocasino.com/blackjack/ruleset

Request Parameters

None

Response

{"result": {"bet_resolution": 100000, "can_hit_split_aces": false, "dealer_hits_on_soft_17": false, "loses_only_original_bet_on_dealer_blackjack": false, "insurance_pays": [2, 1], "number_of_decks": 5, "dealer_peeks": false, "progressive_bets": [100000], "maximum_bet": 1000000, "progressive_init": 100000000, "blackjack_pays": [3, 2], "can_double_on": "first two", "can_resplit_aces": true, "progressive_paytable": [0, 5, 25, 50, 250, 1000, -1], "max_split_count": 3, "can_double_after_split": true}, "time": 0}

result This is the Ruleset dictionary.  These are the meanings of the following items:

  • blackjack_pays - A 2-tuple (x,y) that tells you what the server will pay on a Blackjack (“pays x to y”)
  • insurance_pays - A 2-tuple (x,y) that tells you what the server pays on correct insurance bets (“pays x to y”)
  • number_of_decks - The number of decks that are shuffled for each hand.
  • progressive_bets - A list of the allowed progressive side bet sizes in Satoshis.
  • progressive_paytable - The win amounts for each of the Lucky 7’s winning hands. A -1 means Jackpot (use /blackjack/update to get the current Jackpot value)
  • max_split_count - The maximum number of splits per game.
  • can_hit_split_aces - Whether or not you can hit after splitting aces.
  • can_resplit_aces - Whether or not you can resplit aces.  max_split_count still applies.
  • dealer_hits_on_soft_17 - Whether or not the dealer will stand or hit on soft 17.
  • dealer_peeks - Whether or not the dealer will peek for Blackjack before you can play.
  • can_double_on - One of “first two” (meaning any two card hand), “9-11 only” (only if the value of your first two cards are 9 to 11), “10-11 only” (only if the value of your first two cards are 10 to 11)
  • can_double_after_split - Whether or not you can double after splitting.
  • loses_only_original_bet_on_dealer_blackjack -  If True and if the dealer has Blackjack, then the player would only lose his original bet instead of losing any split or double bets.
  • maximum_bet -  The maximum bet, in Satoshis, that you can place per game, not including the additional side progressive bet.
  • bet_resolution -  The smallest bet increment (also, the smallest bet).  For example, maximum_bet may be 0.01 BTC and bet_resolution 0.001 BTC, meaning you can bet all values between 0.001 and 0.01 as long as they’re in increments of 0.001 BTC.
  • progressive_init -  The starting value of the progressive Jackpot after it is won, in Satoshis.

Create a new random server seed

URL

https://bitcoinvideocasino.com/blackjack/reseed

Description

Request a new server seed for Blackjack.  The server seed hash returned by this service call must be included in the call to /blackjack/deal. This service call is required to ensure that all games played are provably fair. After the first game has been played, the next server seed hash will automatically be returned at the end of the game.

Request

GET https://bitcoinvideocasino.com/blackjack/reseed?account_key=21fa81ad3e520aa8c5a2a3214ccfe70e

Request Parameters

account_key The account key for the account you wish to access (send this as a cookie header)

Response

{"server_seed_hash": "df5633c2a214e7c1e27fd43e8ddf8e47be39fe2c4819d38804efd6b85076347a", "result": true, "time": 2}

result Always true

server_seed_hash The SHA-256 hash of the server seed for the next hand of Blackjack.

Deal a new game of Blackjack

URL

https://bitcoinvideocasino.com/blackjack/deal

Description

Deal a new Blackjack hand. The appropriate number of credits will be deducted from your account.

Request

GET https://bitcoinvideocasino.com/blackjack/deal?bet=100000&account_key=21fa81ad3e520aa8c5a2a3214ccfe70e&progressive_bet=0&server_seed_hash=1664aa53d6c421287427cfc71ecc85e3723c6a6fcd29d140bd781da86109bc10&client_seed=1789692312

Request Parameters

account_key The account key for the account you wish to play with. (send this as a cookie header)

server_seed_hash the server_seed_hash value returned from /blackjack/reseed. It can also be the next server seed hash that was returned from /blackjack/hold.

client_seed A 32 character alphanumeric string that you would like the server to incorporate when shuffling the deck for this Blackjack game.

bet The amount you wish to bet, between 0.001 and 0.01, only increments of 0.001 are allowed, in Satoshis.

progressive_bet If you wish to play in the Lucky 7’s progressive jackpot, set this value to 100000.  If you don’t want to play, set this value to 0.

Response

{"deal_hash": "3088580cd1f3ecb77b0a8976294ac1a3e6b0a516a66bb8a78ba202d88e84f873", "time": 33, "next_hand": 0, "dealer_shows": "jh", "finished": false, "intbalance": 2500000, "cards": ["8s", "ad"], "game_id": "187bb04e422e2730dc0742abf1cce6d3", "unique_id": 8930}

deal_hash The SHA-256 hash of the initial game shuffle, used for provably fair information after a game is complete.

game_id The primary unique ID for this game.  This ID will need to be included in further game actions.

finished See the section titled Finished, below.  If this value is true, then the Blackjack hand is over.  If this value is false, then the server expects you to make a game decision.

dealer_shows This is the card the dealer is showing.

cards These are your starting cards.

next_hand If the game is not finished, this value represents which hand the server expects you to make a decision for. You must include this value as the hand_index in every hand decision.

unique_id Another unique ID for this game, not necessarily useful for API programmers.  This value is unique only within Blackjack games.

Stand on a hand

URL

https://bitcoinvideocasino.com/blackjack/stand

Description

Tell the server you wish to stand on the given hand.

Request

GET https://bitcoinvideocasino.com/blackjack/stand?account_key=21fa81ad3e520aa8c5a2a3214ccfe70e&game_id=187bb04e422e2730dc0742abf1cce6d3&hand_index=0

Request Parameters

account_key The account key for the account you wish to play with. (send this as a cookie header)

game_id the game_id of the game you’re currently playing

hand_index the hand index of the hand you’re making decisions for (see the section Next Hand, below)

Response

{"cards": [“jc”], "finished": false, "next_hand": 1, "time": 2}

cards If this array is non-empty, it is the cards that you were dealt to the next split hand (or hands, if there were split aces).

finished See the section titled Finished, below.  If this value is true, then the Blackjack hand is over.  If this value is false, then the server expects you to make a game decision.

next_hand If the game is not finished, this value represents which hand the server expects you to make a decision for. You must include this value as the hand_index in every hand decision.

Hit on a hand

URL

https://bitcoinvideocasino.com/blackjack/hit

Description

Tell the server you wish to hit on the given hand.

Request

GET https://bitcoinvideocasino.com/blackjack/hit?account_key=21fa81ad3e520aa8c5a2a3214ccfe70e&game_id=187bb04e422e2730dc0742abf1cce6d3&hand_index=0

Request Parameters

account_key The account key for the account you wish to play with. (send this as a cookie header)

game_id the game_id of the game you’re currently playing

hand_index the hand index of the hand you’re making decisions for (see the section Next Hand, below)

Response

{"cards": [“jc”], "finished": false, "next_hand": 1, "time": 2}

cards If this array is non-empty, it is the cards that you were dealt to the next split hand (or hands, if there were split aces).

finished See the section titled Finished, below.  If this value is true, then the Blackjack hand is over.  If this value is false, then the server expects you to make a game decision.

next_hand If the game is not finished, this value represents which hand the server expects you to make a decision for. You must include this value as the hand_index in every hand decision.

Split on a hand

URL

https://bitcoinvideocasino.com/blackjack/split

Description

Tell the server you wish to split the given hand.

Request

GET https://bitcoinvideocasino.com/blackjack/split?account_key=21fa81ad3e520aa8c5a2a3214ccfe70e&game_id=187bb04e422e2730dc0742abf1cce6d3&hand_index=0

Request Parameters

account_key The account key for the account you wish to play with. (send this as a cookie header)

game_id the game_id of the game you’re currently playing

hand_index the hand index of the hand you’re making decisions for (see the section Next Hand, below)

Response

{"cards": [“jc”], "finished": false, "next_hand": 1, "time": 2, “intbalance”: 2700000}

cards Includes the card you are dealt for the left split hand, plus any other cards to the next few hands (if this hand hits 21 or was split aces, for example)

finished See the section titled Finished, below.  If this value is true, then the Blackjack hand is over.  If this value is false, then the server expects you to make a game decision.

next_hand If the game is not finished, this value represents which hand the server expects you to make a decision for. You must include this value as the hand_index in every hand decision.

intbalance Your balance after splitting, in Satoshis

Double on a hand

URL

https://bitcoinvideocasino.com/blackjack/double

Description

Tell the server you wish to double on the given hand.

Request

GET https://bitcoinvideocasino.com/blackjack/double?account_key=21fa81ad3e520aa8c5a2a3214ccfe70e&game_id=187bb04e422e2730dc0742abf1cce6d3&hand_index=0

Request Parameters

account_key The account key for the account you wish to play with. (send this as a cookie header)

game_id the game_id of the game you’re currently playing

hand_index the hand index of the hand you’re making decisions for (see the section Next Hand, below)

Response

{"cards": [“jc”], "finished": false, "next_hand": 1, "time": 2, “intbalance”: 2700000}

cards Includes the card you are dealt for the left split hand, plus any other cards to the next few hands (if this hand hits 21 or was split aces, for example)

finished See the section titled Finished, below.  If this value is true, then the Blackjack hand is over.  If this value is false, then the server expects you to make a game decision.

next_hand If the game is not finished, this value represents which hand the server expects you to make a decision for. You must include this value as the hand_index in every hand decision.

intbalance Your balance after doubling, in Satoshis

Take insurance on the dealer’s showing Ace

URL

https://bitcoinvideocasino.com/blackjack/insurance

Description

Tell the server you wish to take insurance on the dealer’s showing Ace.

Request

GET https://bitcoinvideocasino.com/blackjack/insurance?account_key=21fa81ad3e520aa8c5a2a3214ccfe70e&game_id=187bb04e422e2730dc0742abf1cce6d3&hand_index=0

Request Parameters

account_key The account key for the account you wish to play with. (send this as a cookie header)

game_id the game_id of the game you’re currently playing

Response

{"finished": false, "next_hand": 0, "time": 2, “intbalance”: 2700000}

finished See the section titled Finished, below.  If this value is true, then the dealer had Blackjack and this game is over.  If this value is false, then the server did not have a Blackjack and now expects you to make a game decision.

next_hand If the game is not finished, this value represents which hand the server expects you to make a decision for. You must include this value as the hand_index in every hand decision.

intbalance Your balance after taking insurance, in Satoshis

When finished == true

When playing Blackjack, a game is over when any of the service calls (deal, stand, hit, split, double, insurance) return the key “finished” set to true.  Once a game is finished, your prizes are awarded and you cannot take any further actions in this game.  Each of the service calls return the same set of information (along with the values specified in their respective sections above).  Below are the common keys included when a game is finished:

Response

{"bets": [100000], "time": 9, "actions": "T", "finished": true, "prizes": [200000], "game_seed": "9w83nGaasySeme77MAwnWY2XezRMK9Tr8PL4pBZit8nj1789692312", "client_seed": "1789692312", "progressive_win": 0, "deal_hash_source": "(8s2cadjhkdadtc9h8c7sasqh5cjc4hks3d6hth7h7d3d7hkh7d6s5c8s6stc5sqs3c6hks7cackc7c3d3h6dtsad3dkc8c4sks2s3sjs7h4dtd8s7s9s7s2cjcth7sjs6cksah4s9d5h5h6d4h9s6c2c2sqsasahkh2c2cjdqd6hts4s5cjhts9cth4s4s2s2hqstd5sqh9hkc4c7hqcahjs9d3h9s5d9dtc8h9c3c3c3h6h8h8s6cqdqh5d3sah5hkhkc8d3s5d3h6hqdas2dkdqc4c4c3h9h3c4h5dahqs8cjh4d6s8dqc4cjc9s8s2s7c4dtd9c9h6d2d8hks7dtd8cjc2h8ctcjh7djckh6dqsqcad7dacqhjd5dts7cjd5hkhac9s9h5s5cjh2d2h4dqhtdadkdkd6ctsjs4dqd7s8dth6s3c4cjd9cjskd2d8hac3d6d3stc3sqc6c7h9d2hjd9c8das7c4h2hkc8dacas2d5h9d5c2s5sth8h4h5sqd6s)(9w83nGaasySeme77MAwnWY2XezRMK9Tr8PL4pBZit8nj1789692312)", "game_eval": "W", "prize_total": 200000, "progressive_jackpot": 279020800, "original_bet": 100000, "server_seed_hash": "ee0bbab50e3f8acf7e7107d11e7a06b489e9ba0da37a9ea9664a2cbff71400c7", "intbalance": 2700000, "cards": [], "dealer_hand": ["jh", "2c", "kd"]}

finished Set to true when this game is over

cards These are the cards that were dealt out to you before finishing the game.  They could be received from splitting, hitting, busting, doubling down, busting, or any other Blackjack move that requires cards be dealt to you.  The cards are dealt, in order, according to strict Blackjack rules, thus the hand to which each card is dealt is not included.

dealer_hand This is the set of cards dealt to the dealer, regardless if you bust or not.  As a sort of easter-egg, the dealer hand is always played out so you can see what the next card would have been.

game_seed The is the seed used to shuffle the deck.

client_seed This is the seed you provided in /blackjack/deal and is returned to you by the server for your verification.

deal_hash_source This long string is the input that was used to generate the deal_hash in /blackjack/deal.  You can use this to verify the game.

original_bet This is the size, in Satoshis, of your original game bet from /blackjack/deal.

bets In the event that you double down, take insurance, or split, this bets array will contain your bets for each individual hand, in Satoshis.  The progressive bet is not included in this array.

actions This is a string representing your decisions when playing the game.  S stands for split, T for stand, D for double, H for hit, I for insurance.

prizes Should you beat the dealer on any of your hands, the prizes will be included here, in Satoshis.

prize_total The prize_total is the sum of all your winning hands plus any progressive wins, in Satoshis.

progressive_win If you win a progressive bet, this key will be set to your winnings.  In Satoshis.

game_eval A string representing the game evaluation.  See https://bitcoinvideocasino.com/static/blackjack_eval.js function Blackjack.get_game_eval for details on how this string is constructed.  In short, a “W” represents a won hand and a “L” represents a lost hand.

progressive_jackpot The current value, in Satoshis, of the Blackjack Lucky 7’s jackpot.

intbalance The value of your account Balance, in Satoshis, after all prizes have been awarded.

server_seed_hash A generated server seed for the next game you play.  You can use this value instead of calling /blackjack/reseed for every game.

EXAMPLES

Split

Response: {"cards": ["7s", "ad"], "finished": false, "next_hand": 1, "time": 1}

Explanation: split aces, left hand dealt a 7, must take action on the next hand

Stand

Response: {"bets": [100000, 100000], "time": 68, "actions": "SHTT", "finished": true, "prizes": [200000, 200000], "game_seed": "enpDVU8b1FhiuXkWivBbQMavzAowe6AfUiXBxn3EnKAn734267290", "client_seed": "734267290", "progressive_win": 0, "deal_hash_source": "(td7skd8c2c3c7skhkh6s7s2h7ckdts3h5d8ctskh6s8h6c8stcts3s9hqhth4htdtc8hqhad3d8c5d2sah3dah3h7h7s6d4d6d6cjc7h8h9hjd5h2hth3skc5dac7dksac8c2c4d9d4sjsjh4cah2djdkc3dks3sas7sjc3c9s6d6h2c3h4cqsqhjh7c6htd6s9hjs9sqd3d5s7c5c8sqh6d7d9c4s5dqc2h9d3ckc5ctdac5sqc8dtsjh4hjs3cqsqsas8c5c9c8d2d4d7hkd8h5cth4hahqc7cjhad5cah6cqsqd6hjd4d8d8s3sjdjd4h2d9h5h2d5d9d8d9sjc5hkhtdtc4h7h7hjc6s3cjhtc9s7dasasqcjc8s5h4cac9dqd5h3h2dkcqd9h2sadqcks3h8hkdqh2c2c9d8s8d3sth9c6skd9sjskh4cqd7cjsqs6c9c6d4s4d4s5stckcts5s9cth4c7das2sks7d2had4sks6h6c5s2s6hadac2s3d2h)(enpDVU8b1FhiuXkWivBbQMavzAowe6AfUiXBxn3EnKAn734267290)", "game_eval": "W,W", "prize_total": 400000, "progressive_jackpot": 279021400, "original_bet": 100000, "server_seed_hash": "7d461d95447c8360b6ceb190674d44160213e748d593710d32e90e3409ec405d", "intbalance": 2800000, "cards": [], "dealer_hand": ["8c", "7s", "kh"]}

Explanation: split hand, hit once, then stand twice; game is done, won both hands (dealer busted).

ROULETTE API

LUCKY 0’s PROGRESSIVE GAME

On every Roulette game played, you can wager an additional side bet to play the Lucky 0’s progressive jackpot game.  These are the Lucky 0’s progressive_hand values:

progressive_hand

Name

0

Nothing

1

One Zero in a row

2

Two zeroes in a row

3

Three zeroes in a row (Jackpot!)

You must be playing the progressive side bet for previous zeroes to count.  In other words, you cannot get two zeroes without playing progressive and then on the third zero place a progressive bet expecting to win the jackpot.

ROULETTE BETS

Our Roulette system uses a set of “bet names” to place bets and build the prizes object that is present in several Roulette operations.  This table describes the (approximately 160) bets that one can make:

bet name / string

Meaning

N0 - N36

(Pays 35:1) A specific bet is placed on a specific number.  N4 is a bet on the number 4.

A1, A2, A4, A5 ...

(Pays 17:1) A split bet to the right. For example, A1 means a bet split between the numbers 1 and 2. Ai means a bet on i and i+1.  Therefore, A3, A6, A9, etc are not valid bets because there is no number to the right of that number.

D1, D2, D3 ... D33

(Pays 17:1) A split bet to the south.  For example, D1 means a bet split between the numbers 1 and 4. Di means a bet on i and i+3.  Therefore, D34, D35, and D36 are not valid bets because there is no number to the south of that number.

S1, S4, S7 … S34

(Pays 11:1) A street bet.  For example, S4 means a bet split between 4, 5 and 6.  Si means a bet on i, i+1 and i+2.  Therefore S2, S3, S5, S7, etc. are not valid bets.

C1, C2, C4, C5 ...

(Pays 8:1) A corner bet.  For example, C4 means a bet split between 4, 5, 7, and 8. Ci means a bet on i, i+1, i+3 and i+4.  Therefore, C3, C6 … C34, C35, C36 are not valid bets because there is either no number to the right or to the south.

DS1, DS4, DS7 … DS31

(Pays 5:1) A double street bet.  For example, DS7 is a bet on 7, 8, 9, 10, 11 and 12. DSi means a bet on i, i+1, i+2, i+3, i+4, and i+5.  Therefore, DS2, DS3, DS5 .. DS34 are not valid bets.

B01, B02, B03

(Pays 17:1) A split basket bet on 2 numbers.  B01 is a bet split on 0 and 1. B02 is a bet split on 0 and 2. B03 is a bet split on 0 and 3.

B012, B023

(Pays 11:1) A split basket bet on 3 numbers. B012 is a bet split on 0, 1 and 2. B023 is a bet split on 0, 2 and 3.

B4

(Pays 8:1) A split basket bet on 4 numbers. B4 is a bet split on 0, 1, 2 and 3.

E, O

(Pays 1:1) An even or odd bet.

R, B

(Pays 1:1) A bet on red or black.

L18, H18

(Pays 1:1) A bet on the High or Low 18 numbers.

L12, M12, R12

(Pays 2:1) A bet on a column.  L12 are the numbers 1, 4, 7, … M12 are the numbers 2, 5, 8, … R12 are the numbers 3, 6, 9, ...

FD, MD, TD

(Pays 2:1) A bet on a dozen numbers. FD are the numbers 1-12, MD is for 13-24 and TD is for 25-36.

Get the Roulette Ruleset

URL

https://bitcoinvideocasino.com/roulette/ruleset

Description

You can at any time figure out which rules are in effect for Roulette.  These rules, in practice, will rarely change.  We reserve the right to adjust the rules to accommodate any odds changes that may be required in the future, however, we anticipate that the current rules are here to stay.

Request

GET https://bitcoinvideocasino.com/roulette/ruleset

Request Parameters

None

Response

{"result": {"bet_resolution": 100000, "number_of_zeros": 1, "progressive_bets": [100000], "maximum_bet": 1000000, "progressive_init": 2000000000, "progressive_paytable": [0, 1, 250, -1], "last_number_count": 20}, "time": 0}

result This is the Ruleset dictionary.  These are the meanings of the following items:

  • number_of_zeros - The number of zeroes that exist on this Roulette table.
  • last_number_count - The number of “last_numbers” that the server will remember for your games.
  • progressive_bets - A list of the allowed progressive side bet sizes in Satoshis.
  • progressive_paytable - The win amounts for each of the Lucky 0’s winning hands. A -1 means Jackpot (use /roulette/update to get the current Jackpot value)
  • maximum_bet -  The maximum bet, in Satoshis, that you can place per game, not including the additional side progressive bet.
  • bet_resolution -  The smallest bet increment (also, the smallest bet).  For example, maximum_bet may be 0.01 BTC and bet_resolution 0.001 BTC, meaning you can bet all values between 0.001 and 0.01 as long as they’re in increments of 0.001 BTC.
  • progressive_init -  The starting value of the progressive Jackpot after it is won, in Satoshis.

Create a new random server seed

URL

https://bitcoinvideocasino.com/roulette/reseed

Description

Request a new server seed for Roulette.  The server seed hash returned by this service call must be included in the call to /roulette/spin. This service call is required to ensure that all games played are provably fair. After the first game has been played, the next server seed hash will automatically be returned at the end of the game.

Request

GET https://bitcoinvideocasino.com/roulette/reseed?account_key=21fa81ad3e520aa8c5a2a3214ccfe70e

Request Parameters

account_key The account key for the account you wish to access (send this as a cookie header)

Response

{"server_seed_hash": "df5633c2a214e7c1e27fd43e8ddf8e47be39fe2c4819d38804efd6b85076347a", "result": true, "time": 2}

result Always true

server_seed_hash The SHA-256 hash of the server seed for the next hand of Roulette.

Play a game of Roulette

URL

https://bitcoinvideocasino.com/roulette/spin

Description

Spin the wheel for a new game of Roulette. The appropriate number of credits will be deducted from your account and any winnings will be added.

Request

GET https://bitcoinvideocasino.com/roulette/spin?account_key=21fa81ad3e520aa8c5a2a3214ccfe70e&server_seed_hash=e9bdd1666cc35556dd5c5e2df021ad0900cd538a7d2c282094a08a52ce90bb68&client_seed=54977743&progressive_bet=100000&N14=100000&E=200000&N0=100000&B02=100000&R12=100000&O=100000

Request Parameters

account_key The account key for the account you wish to play with. (send this as a cookie header)

server_seed_hash the server_seed_hash value returned from /roulette/reseed. It can also be the next server seed hash that was returned from a previous call to /roulette/spin.

client_seed A 32 character alphanumeric string that you would like the server to incorporate when shuffling the deck for this Roulette game.

bets You must include at least one bet (See the section on Roulette Bets) to play, not including the progressive bet.  Each bet value is specified as a single value in the query string.  For example “N4=100000” is to place 100000 Satoshi bet on the number 4.

progressive_bet If you wish to play in the Lucky 0’s progressive jackpot, set this value to 100000.  If you don’t want to play, set this value to 0.

Response

{"last_numbers": [[5, 100000], [0, 100000], [10, 100000], [30, 100000], [26, 100000], [25, 100000], [0, 100000], [14, 100000], [24, 100000], [31, 100000], [25, 100000], [22, 100000], [26, 100000], [26, 100000], [1, 100000], [15, 100000], [4, 100000], [15, 100000], [5, 100000], [31, 100000]], "intgamearnings": 0, "prizes": {"O", 200000}, "game_seed": "erhA6npzvuohnfpWFAjcm4KzSkCeLHDmpSoPV6tHBR9754977743", "game_id": "f16d98ea7cbf2f932c8ae8efdc8089b5", "inttotalbet": 500000, "progressive_win": 0, "ball_number": 31, "progressive_jackpot": 2453277800, "intlost": 500000, "progressive_hand": 0, "time": 4, "server_seed_hash": "d680cc1eff4d9b82e2f1286f4eb8590620f876c381d50d1003dde2d8e1ed0287", "intbalance": 61279518500, "unique_id": 23644, "intwinnings": 0}

game_id The primary unique ID for this game.  This ID will need to be included in further game actions.

last_numbers These are the most recent numbers for your Roulette games. This is a list of tuples, (x, y) where x is the ball number from a previous game and y is the progressive bet placed on that game. This list is sorted oldest to most recent.

ball_number The number the ball landed on after spinning.  The winning prizes are based on this number.

unique_id Another unique ID for this game, not necessarily useful for API programmers.  This value is unique only within Roulette games.

game_seed The is the seed used to shuffle the deck.

inttotalbet This is the size, in Satoshis, of your total bets, not including the progressive bet.

intlost The amount of your bet that was lost.  

prizes The final game evaluation of this game. See the section on on Roulette Bets.  This prizes is an object, where the key is the bet and the value of that key is the winnings on that bet, including your original bet.

intwinnings The sum of the prizes plus any progressive win, in Satoshis.

intgameearnings The amount of money won in this game, minus your bet, in Satoshis.

progressive_hand If you are playing progressive Lucky 0’s, this value is the number of 0’s in a row that you have gotten so far. 0, 1, 2 or 3.  3 is a jackpot.

progressive_win If you win a progressive bet, this key will be set to your winnings.  In Satoshis.

progressive_jackpot The current value, in Satoshis, of the Blackjack Lucky 7’s jackpot.

intbalance The value of your account Balance, in Satoshis, after all prizes have been awarded.

server_seed_hash A generated server seed for the next game you play.  You can use this value instead of calling /roulette/reseed for every game.

CRAPS API

LUCKY SIXES PROGRESSIVE GAME

On every Craps game played, you can wager an additional side bet to play the Lucky Sixes progressive jackpot game. If you play Lucky Sixes, you roll an additional 4 dice, and the total number of sixes you have rolled from all six dice is added up. These are the Lucky 0’s progressive_hand values:

progressive_hand

Name

0

No sixes rolled

1

One six rolled

2

Two sixes rolled

3

Three sixes rolled (Prize)

4

Four sixes rolled (Prize)

5

Five sixes rolled (Prize)

6

Six sixes rolled (Jackpot!)

CRAPS BETS

Our Craps system uses a set of “bet names” to place bets and build the prizes object that is present in several Roulette operations.  This table describes the bets that one can make:

bet name / string

Meaning

P

Pass line

DP

Don’t pass line

C

Come bet

DC

Don’t come bet

PO

Pass odds

DPO

Don’t pass odds

PL4, PL5, PL6, PL8, PL9, PL10

Place bet

DPL4, DPL5, DPL6, DPL8, DPL9, DPL10

Don’t place bet

B4, B5, B6, B8, B9, B10

Buy bet

L4, L5, L6, L8, L9, L10

Lay bet

BIG6, BIG8

Big 6, Big 8

H4, H6, H8, H10

Hardways (2+2, 3+3, 4+4, 5+5)

PROP2, PROP3, PROP11, PROP12

Proposition (1+1, 6+6, 1+2, 6+5)

PROP7

Seven

PROPC

Craps

PROPCE

Craps-Eleven

F

Field

CO4, CO5, CO6, CO8, CO9, CO10

Come odds

DCO4, DCO5, DCO6, DCO8, DC09, DCO10

Don’t come odds

Create a new random server seed

URL

https://bitcoinvideocasino.com/craps/reseed

Description

Request a new server seed for Craps.  The server seed hash returned by this service call must be included in the call to /craps/roll. This service call is required to ensure that all games played are provably fair. After the first game has been played, the next server seed hash will automatically be returned at the end of the game.

Request

GET https://bitcoinvideocasino.com/craps/reseed?account_key=21fa81ad3e520aa8c5a2a3214ccfe70e

Request Parameters

account_key The account key for the account you wish to access (send this as a cookie header)

Response

{"server_seed_hash": "df5633c2a214e7c1e27fd43e8ddf8e47be39fe2c4819d38804efd6b85076347a", "result": true, "time": 2}

result Always true

server_seed_hash The SHA-256 hash of the server seed for the next hand of Roulette.

Play a game of Craps

URL

https://bitcoinvideocasino.com/roulette/roll

Description

Roll the dice for a game of Craps. This service call is used to both start a new game, and to continue a game already in progress.

Request

GET https://bitcoinvideocasino.com/craps/roll?&account_key=68fb692c841146a91e88c84b3552edbb&server_seed_hash=c9116da6961728eb1240ad7520f9ebd3478f78d334e3a9506a44b0299b39f646&client_seed=7010801243704944719&progressive_bet=0&P=100000&BIG8=100000&commission=0

Request Parameters

account_key The account key for the account you wish to play with. (send this as a cookie header)

server_seed_hash the server_seed_hash value returned from /roulette/reseed. It can also be the next server seed hash that was returned from a previous call to /roulette/spin.

client_seed A 32 character alphanumeric string that you would like the server to incorporate when rolling the dice for this Craps game.

bets optional Unless there are chips on the table from a previous roll, you must include at least one bet (See the section on Craps Bets) to play, not including the progressive bet.  Each bet value is specified as a single value in the query string.  For example “N4=100000” is to place 100000 Satoshi bet on the number 4.

progressive_bet If you wish to play in the Lucky 0’s progressive jackpot, set this value to 100000.  If you don’t want to play, set this value to 0.

commission This must be set to the total commission paid on Buy and Lay bets.  The commission (on bets B4, B5, B6, B8, B9, B10, L4, L5, L6, L8, L9, L10) is 5% of the bet total.  If you bet “L5=100000” then you must also include “commission=5000” in the query string.  This value is required, so if no commission bets are made, send “commission=0”

session_id optional Required to continue rolling in this game of craps. See the Response section below.

Response

{"losing_bets": {}, "rolled_numbers": [4, 4], "current_bets": {"P": 100000}, "progressive_win": 0, "server_seed_hash": "7d7293db76484cfe8755f1bbce93f21586d168b53d7e57ff2053c88d756969ef", "pushed_bets": {}, "num_points_hit": 0, "time": 265, "last_rolls": [[[5, 5], 0], [[4, 3], 0], [[6, 6], 0], [[1, 1], 0], [[3, 4], 0], [[3, 1], 0], [[2, 1], 0], [[3, 4], 0], [[1, 6], 0], [[4, 3], 0], [[1, 2], 0], [[6, 6], 0], [[4, 2], 0], [[3, 5], 0], [[4, 6], 0], [[6, 1], 0], [[1, 1], 0], [[5, 6], 0], [[1, 6], 0], [[4, 4], 0]], "prizes": {"BIG8": 200000}, "game_seed": "38p7a38E9mf8tzVmAm8dmVi2zpWAVc1ciz8YAmZ7c7ak7010801243704944719", "the_last_point": null, "intgamearnings": 200000, "session_over": false, "progressive_jackpot": 2026876685, "session_id": "a83031137e3bcd41b025ad96bf65fa07", "intlost": 0, "progressive_hand": 0, "intbalance": 508618055, "intwinnings": 200000, "unique_id": 16751, "the_point": 8}

session_id The identifier used to represent this particular session of craps. This is used to keep track of the previous state of the game. This session_id should be passed back to each successive call to /craps/roll.  If session_over is false, then the session id (used only to reference the past series of rolls) should be included in the next call to /craps/roll.  If session_over is true, then do not include the session_id to the next call to /craps/roll.

rolled_numbers The dice that were rolled. In a regular game, two dice are returned. If a progressive game is played, six dice are returned.

prizes The bets that were winners. Prizes is an object, where the key is the bet and the value of that key is the winnings on that bet, including your original bet.

losing_bets The bets that did not win anything. These bets have now been taken off the table.

current_bets The bets that are still on the table. The outcome of this roll has caused these bets to still remain.

pushed_bets A bet in prizes, even though it returns money from the table, may be a push if it returns your original bet.  A pushed bet will be in both prizes and pushed_bets keys.

the_point The current point. This will either be a number, indicating the current point, or null, indicating that the point is off.

num_points_hit The number of points you have hit in a row without rolling a seven or taking all bets off the table.

intwinnings The sum of the prizes plus any progressive win, in Satoshis.

intlost The amount lost in this game, in Satoshis.

progressive_hand If you are playing progressive Lucky Sixes, this value is the number of sixes showing on the dice that were rolled. 6 sixes is a jackpot win.

progressive_win If you win a progressive bet, this key will be set to your winnings.  In Satoshis.

progressive_jackpot The current value, in Satoshis, of the Craps Lucky Sixes jackpot.

intbalance The value of your account Balance, in Satoshis, after all prizes have been awarded.

server_seed_hash A generated server seed for the next game you play.  You should use this value instead of calling /craps/reseed for every game.

the_last_point The state of the point before this roll.

last_rolls The previous rolls made by this user.

unique_id Another unique ID for this game, not necessarily useful for API programmers.  This value is unique only within Video Poker games.

Pick up chips off table

URL

https://bitcoinvideocasino.com/craps/pickup

Description

While playing a session, some bets can be taken off the table. These chips will then be added to the user’s account balance.

Request

GET https://bitcoinvideocasino.com/craps/pickup?account_key=68fb692c841146a91e88c84b3552edbb&PO=1&session_id=44f3633cc633793982d5d9411695a31e

Request Parameters

account_key The account key for the account you wish to play with. (send this as a cookie header)

session_id The identifier used to represent this particular session of craps.

pickups One or more bets that should be picked up. The parameters must look like BETID=1. Please see the section on Craps Bets for bet names.  Any bet that has odds placed on it must be picked up at the same time as that bet.  For example, if “P” is removed, “PO” must also be removed.

Response

{"current_bets": {"P": 100000}, "time": 61, "session_over": false, "session_id": "44f3633cc633793982d5d9411695a31e", "intremoved": 100000}

current_bets The chips that are currently left on the table.

session_over Whether or not the session is now over. If session_over is true, you cannot use this session_id in any further calls to /craps/roll

session_id The identifier for the session currently being played. The next call to /craps/roll or /craps/pickup must use this value.

intremoved The amount in Satoshis that was taken off the table

intbalance The value of your account Balance, in Satoshis, after all prizes have been awarded.

KENO API

Bitcoin Video Casino Keno is an online Keno game with a progressive jackpot and a special triple bonus. The user selects 10 numbers, and the server randomly chooses 20 balls.

If you bet 5 credits and get 8, 9 or 10 hits, you will win the progressive jackpot in addition to the standard payout for that number of credits.

If the last ball picked by the server is a number that you picked, you win the triple bonus. This earns you three extra balls (for a total of 23 balls) AND all prizes are tripled. For example, if you bet 5 credits and get 6 hits, you normally win 35 credits. With the triple bonus, you will win 105 credits.

Create a new random server seed

URL

https://bitcoinvideocasino.com/keno/reseed

Description

Request a new server seed for Keno.  The server seed hash returned by this service call must be included in the call to /keno/bless. This service call is required to ensure that all games played are provably fair. After the first game has been played, the next server seed hash will automatically be returned at the end of the game, from the /keno/bless service call.

Request

GET https://bitcoinvideocasino.com/keno/reseed?account_key=21fa81ad3e520aa8c5a2a3214ccfe70e

Request Parameters

account_key The account key for the account you wish to access (send this as a cookie header)

Response

{"server_seed_hash": "df5633c2a214e7c1e27fd43e8ddf8e47be39fe2c4819d38804efd6b85076347a", "result": true, "time": 2}

result Always true

server_seed_hash The SHA-256 hash of the server seed for the next game of Keno.

Play a new game of Keno

URL

https://bitcoinvideocasino.com/keno/bless

Description

Begin a new Keno game. The appropriate amount of credits will be added or subtracted from your account depending on the outcome of the game.

Request

GET https://bitcoinvideocasino.com/keno/bless?account_key=68fb692c841146a91e88c84b3552edbb&server_seed_hash=f6d912a3880ca93df0847831326c6dfa7d1cca7ff0a5af5121f6df255888b865&client_seed=29743923952728657651&numbers=12,24,25,32,43,52,53,58,64,71&credit_btc_value=100000&bet_size=1

Request Parameters

account_key The key to the account you want to play the game with (send this as a cookie header)

server_seed_hash The server seed hash that was returned from a call to /keno/reseed. It will also be the next server seed hash that was returned from /keno/bless.

client_seed A random 32 character alphanumeric string, provided by you, that will be used when randomizing the picked balls.

credit_btc_value The size of 1 credit in this game, in Satoshis.  This value can only be 100000 (0.001 BTC).

bet_size The number of credits to bet. This number can be from 1 to 5. If the user bets 5 credits, he will also win the progressive jackpot on 8, 9 and 10 hits.

numbers The numbers that the user has chosen. This must be exactly 10 numbers, separated by commas.

Response

On Success,

{"hit_numbers": [64, 71], "time": 66, "blessed_numbers": [7, 38, 29, 22, 23, 8, 5, 80, 59, 61, 72, 40, 1, 3, 41, 44, 27, 18, 78, 71, 10, 45, 64], "game_seed": "c65pMwk7XKHUeipRweg9ck1bxNyi8C21ritY5xp4Kcsn29743923952728657651", "game_id": "588a6595cd1308876f1d1d54a28d3179", "intgameaarnings": 0, "progressive_win": 0, "prize": 0, "progressive_jackpots": {"8": 239784, "9": 247200, "10": 247200}, "server_seed_hash": "4056db9a85abfc287e8dec091e29d36287f3f4e37896cb751a35acac4a3fe231", "intbalance": 2868354666, "unique_id": 52433, "intwinnings": 0}

intbalance Your balance after credits for this game have been deducted.

hit_numbers The list of numbers that the user picked which the server also picked.

blessed_numbers The list of numbers that the server picked. If the user hit the last number triple bonus, this will return 23 numbers. Otherwise it will return 20 numbers.

game_seed This is the seed used to randomize the game.  Your client_seed passed in /keno/bless will always be at the end of this string.

game_id The primary unique ID for this game.  This ID will need to be included in further game actions.

intgameearnings The amount of money won in this game, minus your bet, in Satoshis.

progressive_win If you win a progressive bet, this key will be set to your winnings.  In Satoshis.

prize This is the final winnings on this bet, including the original bet.

server_seed_hash A generated server seed for the next game you play.  You should use this value instead of calling /keno/reseed for every game.

unique_id Another unique ID for this game, not necessarily useful for API programmers.  This value is unique only within Keno games.

intwinnings The sum of the prizes plus any progressive win, in Satoshis.

progressive_jackpots The current value of the progressive jackpots. Since there are separate progressive jackpots for 8, 9 and 10 hits, three numbers will be returned.

shutdown_time As with /account/withdraw, if the server is going down for mantenance, this value will be the time in seconds until the server shuts down.

On Error,

{"time": 4, "error": "need_seed"}

error This value will be present and will be one of the following values:

  • shutting_down - You cannot play any games as the server is about to shut down.
  • need_seed - The value provided in server_seed_hash is old or invalid. You should call /keno/reseed again and retry dealing.
  • invalid credit_btc_value - You specified an invalid value for the credit size.
  • insufficient_funds - You do not have enough Bitcoins to play this game on this bet size.

SLOTS API

Bitcoin Video Casino Slots is an online Slots game with a progressive jackpot, wild symbols, scatter symbols, and a 10 free spin bonus.

The Slots reel has wild symbols. These can count for anything else towards winning a line, except for a scatter symbol. Getting five wild symbols in a row will earn the progressive jackpot.

Scatter symbols do not need to form a line in order to win. As long as they show up anywhere on the game board, they will count towards a sequence. If the user gets three or more scatter symbols, he will win 10 free spins. While playing the free games, the user will still earn more free spins if he gets more scatter symbols.

The user can bet on 1 to 20 lines per game. Betting on more lines increases a user’s chance of winning. Each additional line costs an extra credit.

Symbols in the game are represented as numbers from 0 to X. Symbol 0 is always the scatter symbol, and symbol 1 is the wild symbol. Symbols 2 and higher are standard symbols of decreasing value.

Get the Slots Ruleset

URL

https://bitcoinvideocasino.com/slots/ruleset

Description

You can at any time figure out which rules are in effect for Slots.  These rules, in effect, will rarely change.

Request

GET https://bitcoinvideocasino.com/slots/ruleset

Request Parameters

None

Response

{"result": {"lines": [[1, 1, 1, 1, 1], [0, 0, 0, 0, 0], [2, 2, 2, 2, 2], [0, 1, 2, 1, 0], [2, 1, 0, 1, 2], [0, 0, 1, 2, 2], [2, 2, 1, 0, 0], [1, 0, 1, 2, 1], [1, 2, 1, 0, 1], [0, 1, 1, 1, 2], [2, 1, 1, 1, 0], [1, 0, 0, 1, 2], [1, 2, 2, 1, 0], [1, 1, 0, 1, 2], [1, 1, 2, 1, 0], [0, 0, 1, 2, 1], [2, 2, 1, 0, 1], [1, 0, 1, 2, 2], [1, 2, 1, 0, 0], [0, 0, 0, 1, 2]], "bonus_game_lines": 10, "progressive_init": 0, "wild_can_be": [2, 3, 4, 5, 6, 7, 8, 9], "order_of_wins": [[1, 5], [1, 4], [2, 5], [3, 5], [4, 5], [1, 3], [5, 5], [2, 4], [6, 5], [3, 4], [7, 5], [8, 5], [4, 4], [5, 4], [6, 4], [9, 5], [2, 3], [3, 3], [7, 4], [4, 3], [1, 2], [5, 3], [8, 4], [9, 4], [6, 3], [7, 3], [8, 3], [9, 3]], "valid_credit_sizes": [100000], "num_scatters_for_bonus": 3, "bonus_multipliers": {"2": 2, "3": 5, "4": 20, "5": 100}, "reels": [[7, 6, 7, 5, 9, 6, 5, 1, 3, 5, 9, 4, 9, 3, 8, 2, 9, 0, 8, 9, 1, 8, 9, 7, 2, 9, 4, 7, 8, 9, 6, 8, 9, 0, 6, 8], [1, 5, 9, 7, 5, 9, 7, 8, 4, 9, 2, 7, 9, 6, 7, 9, 8, 1, 9, 6, 3, 9, 8, 0, 9, 4, 8, 2, 9, 5, 6, 8, 9, 3, 8, 9], [9, 6, 8, 4, 9, 3, 6, 9, 2, 8, 9, 4, 1, 8, 9, 5, 8, 5, 9, 7, 2, 4, 9, 5, 7, 9, 8, 9, 7, 9, 1, 8, 0, 6, 3, 8], [8, 3, 1, 8, 5, 0, 6, 8, 6, 9, 8, 6, 9, 3, 2, 9, 5, 8, 9, 3, 8, 9, 4, 6, 9, 2, 8, 5, 7, 4, 9, 1, 4, 9, 7, 7], [9, 7, 3, 1, 0, 8, 7, 3, 9, 7, 6, 1, 8, 7, 4, 8, 5, 9, 8, 2, 2, 3, 8, 7, 6, 5, 9, 6, 4, 9, 5, 6, 4, 2, 6, 9]], "progressive_contribution": 80, "wild": 1, "scatter": 0, "paytable": {"(1, 5)": 10000, "(6, 4)": 40, "(3, 4)": 100, "(5, 5)": 200, "(1, 3)": 200, "(2, 3)": 20, "(7, 3)": 5, "(8, 5)": 80, "(2, 4)": 200, "(8, 3)": 5, "(9, 3)": 2, "(9, 5)": 30, "(4, 4)": 70, "(5, 3)": 10, "(6, 3)": 5, "(6, 5)": 100, "(5, 4)": 50, "(3, 5)": 500, "(7, 4)": 15, "(1, 2)": 10, "(3, 3)": 20, "(1, 4)": 1000, "(7, 5)": 90, "(8, 4)": 10, "(2, 5)": 600, "(9, 4)": 5, "(4, 5)": 400, "(4, 3)": 15}}, "time": 0}

result This is the Ruleset dictionary.  These are the meanings of the following items:

  • lines - A representation of the arrangement of the lines that the user can play. Each tuple of five numbers represents a single line. 0 is the top row, 1 is the middle row, 2 is the bottom row. So [1,1,1,1,1] is a line running straight across the middle row, while [0,0,1,2,2] is a line where the first two symbols are on the top, followed by a middle symbol, and then the last two symbols are on the bottom.
  • num_scatters_for_bonus - The number of scatter symbols that you ned to get in order to win the free spin bonus.
  • bonus_game_lines - The number of free spins that you earn if you get num_scatters_for_bonus scatter symbols.
  • bonus_multipliers - The prizes for getting scatters. Each entry is a tuple, where the first value is the number of scatters, and the second is the prize. These prizes are multiplied by the number of lines played. If you play 10 lines, get 4 scatters, and the 4 scatter bonus is 20, the user will win 10*20=200 credits.
  • progressive_init -  The starting value of the progressive Jackpot after it is won, in Satoshis. This is currently 0 since the user still wins a large base prize for winning the jackpot in addition to anything in the progressive pot.
  • wild_can_be - The symbols that the wild symbol is allowed to represent. Currently it is all symbols except for the scatter symbol.
  • order_of_wins - The list of all possible wins, listed in decreasing order of value. Each win is represented as a tuple, where the first value is the symbol ID, and the second value is the number of symbols in a row. So [1,5] indicates getting 5 wild symbols in a row.
  • valid_credit_sizes - The valid credit size that the user is allowed to bet, in Satoshis. One of the values from this list must be specified in the call to /pull.
  • reels - The configuration of the 5 Slots reels. The numbers represent the symbol. When the user plays a game using /pull, the reel positions returned will be offsets into these arrays.
  • progressive_contribution - The fraction of a credit contributed to the progressive jackpot for each credit that is played. This is represented as 1/10,000ths of a credit.
  • wild - The ID of the wild symbol.
  • scatter -  The ID of the scatter symbol.
  • paytable - The list of all payouts. Each possible win is of this format: "(1, 5)": 10000. In this example the 1 represents symbol 1 (the wild symbol), the 5 represents getting 5 in a row, and the 10000 represents a prize of 10000 credits for getting this.

Create a new random server seed

URL

https://bitcoinvideocasino.com/slots/reseed

Description

Request a new server seed for Slots.  The server seed hash returned by this service call must be included in the call to /slots/pull. This service call is required to ensure that all games played are provably fair. After the first game has been played, the next server seed hash will automatically be returned at the end of the game, from the /slots/pull service call.

Request

GET https://bitcoinvideocasino.com/slots/reseed?account_key=21fa81ad3e520aa8c5a2a3214ccfe70e

Request Parameters

account_key The account key for the account you wish to access (send this as a cookie header)

Response

{"server_seed_hash": "df5633c2a214e7c1e27fd43e8ddf8e47be39fe2c4819d38804efd6b85076347a", "result": true, "time": 2}

result Always true

server_seed_hash The SHA-256 hash of the server seed for the next game of Slots.

Play a new game of Slots

URL

https://bitcoinvideocasino.com/slots/pull

Description

Begin a new Slots game. The appropriate amount of credits will be added or subtracted from your account depending on the outcome of the game.

Request

https://bitcoinvideocasino.com/slots/pull?account_key=115f7b5be012fa14095f40e3921ed089&server_seed_hash=71922074707a7500d0a9c405c47bd81b70d09b3303e3d704e92c93138d4f317f&client_seed=3247116611303971431&credit_btc_value=100000&num_lines=7

Request Parameters

account_key The key to the account you want to play the game with (send this as a cookie header)

server_seed_hash The server seed hash that was returned from a call to /slots/reseed. It will also be the next server seed hash that was returned from /slots/pull.

client_seed A random 32 character alphanumeric string, provided by you, that will be used when randomizing the picked balls.

credit_btc_value The size of 1 credit in this game, in Satoshis.  This value can only be 100000 (0.001 BTC).

num_lines The number of lines that the user is playing. Each additional line costs 1 extra credit.

Response

On success,

{"reel_positions": [18, 2, 30, 17, 4], "time": 37, "bonus_multiplier": 1, "num_scatters": 2, "game_seed": "fABycmVpfFzWTrJNLdgsNBCKnPSTxwkKTeHYJJAMnPEZ3247116611303971431", "game_id": "e41e0fa9666dc7d29395ce9c9fc6d7e5", "intgameaarnings": 1200000, "progressive_win": 0, "prize": 19, "free_spin_info": {"left": 0}, "progressive_jackpot": 163942920, "server_seed_hash": "beccd2e264838c97b8993be9a4963d7560ee6c4ac0bfc7163d2ed62271609a48", "intbalance": 427698000, "intwinnings": 1900000, "unique_id": 5122, "prizes": {"4": [[7, 3], 5]}}

reel_positions These are the offsets into the five reels, to indicate where they stopped spinning. To determine what symbols to show, take the ruleset.reels array and use reel_positions as the index for each real. reels[x], reels[x+1] and reels[x+2] will be the symbols. Note that the reels are circular and wrap around at the end.

game_seed This is the seed used to randomize the reels.  Your client_seed that was passed in /slots/pull will always be at the end of this string.

game_id The primary unique ID for this game.  This ID will need to be included in further game actions.

intgameearnings The amount of money won in this game, minus your bet, in Satoshis.

progressive_win If you win a progressive bet, this key will be set to your winnings.  In Satoshis.

server_seed_hash A generated server seed for the next game you play.  You should use this value instead of calling /slots/reseed for every game.

unique_id Another unique ID for this game, not necessarily useful for API programmers.  This value is unique only within Slots games.

intwinnings The sum of the prizes plus any progressive win, in Satoshis.

progressive_jackpot The current value of the progressive jackpot.

shutdown_time As with /account/withdraw, if the server is going down for mantenance, this value will be the time in seconds until the server shuts down.

prizes This is the final winnings on this bet, including the original bet. An example of a single prize won is: "4": [[7, 3], 5]. In this case, it indicates that line #4 got 3-in-a-row symbol ID 7, and the prize for that was 5 credits. The

num_scatters This is the number of scatters won.

bonus_multiplier This is the prize that was awarded for having scatters on the board. This value is multiplied by the number of lines played to get the total scatter prize.

intbalance Your balance after credits for this game have been deducted.

On Error,

{"time": 4, "error": "need_seed"}

error This value will be present and will be one of the following values:

  • shutting_down - You cannot play any games as the server is about to shut down.
  • need_seed - The value provided in server_seed_hash is old or invalid. You should call /slots/reseed again and retry dealing.
  • invalid credit_btc_value - You specified an invalid value for the credit size.
  • insufficient_funds - You do not have enough Bitcoins to play this game on this bet size.

DICE API

Bitcoin Video Casino Dice is an online “Dice” game with a bonus progressive jackpot. The user selects his desired payout and chance of winning, and then attempts to roll a number above or below the target number in order to collect his winnings.

A random number from 0 to 999999 is selected as the lucky number.

To determine your chance of winning, and the number that you must roll under to win, use the following formula:

bet_chance = (RULESET['player_return'] / 1000000) / desired_payout_multiplier

There are two progressive jackpots that can be won on any bet. The number of 7’s in the resulting lucky number is counted up. If there are five 7’s, the small progressive jackpot is won. If there are six 7’s, the large progressive jackpot is won. These winnings are in addition to any winnings from the game itself.

Get the Dice Ruleset

URL

https://bitcoinvideocasino.com/dice/ruleset

Description

You can at any time figure out which rules are in effect for Dice.  These rules, in effect, will rarely change.

Request

GET https://bitcoinvideocasino.com/dice/ruleset

Request Parameters

None

Response

{"result": {"bet_resolution": 10000, "minimum_payout": 102061855, "maximum_profit": 50000000, "player_return": 99000000, "last_number_count": 20, "maximum_payout": 10000000000, "progressive_jackpots": [5, 6]}, "time": 0}

result This is the Ruleset dictionary.  These are the meanings of the following items:

  • bet_resolution - The bet must be a multiple of this value.
  • minimum_payout - The smallest allowed payout (which would also give you the highest chance of winning). 102061855 represents a 1.02061855X payout multiplier.
  • maximum_profit - The maximum allowed profit in satoshis. Profit is calculated as total amount won from this game, minus the amount that was bet.
  • player_return - The expected return of this game. This value is used to calculate what lucky number you must roll in order to win. 99000000 represents a 99% return.
  • last_number_count -  The maximum number of last numbers rolled that the system will report back.
  • maximum_payout - The largest allowable payout multiplier. Divide by 100000000 to get the actual value (10000000000 represents a max payout of 100X).
  • progressive_jackpots - The list of available progressive jackpots. The numbers are the amount of 7’s you need to get in order to win that jackpot.

Create a new random server seed

URL

https://bitcoinvideocasino.com/dice/reseed

Description

Request a new server seed for Dice.  The server seed hash returned by this service call must be included in the call to /dice/throw. This service call is required to ensure that all games played are provably fair. After the first game has been played, the next server seed hash will automatically be returned at the end of the game, from the /dice/throw service call.

Request

GET https://bitcoinvideocasino.com/dice/reseed?account_key=21fa81ad3e520aa8c5a2a3214ccfe70e

Request Parameters

account_key The account key for the account you wish to access (send this as a cookie header)

Response

{"server_seed_hash": "df5633c2a214e7c1e27fd43e8ddf8e47be39fe2c4819d38804efd6b85076347a", "result": true, "time": 2}

result Always true

server_seed_hash The SHA-256 hash of the server seed for the next game of Dice.

Play a new game of Dice

URL

https://bitcoinvideocasino.com/dice/throw

Description

Play a new Dice game. The appropriate amount of credits will be added or subtracted from your account depending on the outcome of the game.

Request

https://bitcoinvideocasino.com/dice/throw?account_key=68fb692c841146a91e88c84b3552edbb&server_seed_hash=906603054f404527e01367dc2ba69c1b5b2223155d30963848ff1690325ddc63&client_seed=8046137452273293908&bet=100000&payout=200000000&target=high&use_fake_credits=false

Request Parameters

account_key The key to the account you want to play the game with (send this as a cookie header)

server_seed_hash The server seed hash that was returned from a call to /dice/reseed. It will also be the next server seed hash that was returned from /dice/throw.

client_seed A random 32 character alphanumeric string, provided by you, that will be used when randomizing the picked balls.

bet The bet, in satoshis. This amount will be deducted from the user’s account. If the users wins the roll, he will then get credited this bet amount multiplied by the payout multiplier.

payout The chosen payout multiplier for this game. Higher payout multipliers have a lower chance of winning, while a lower payout multiplier is more likely to win. Divide by 100000000 to get the multiplier.

target Can be either “high” or “low”. If “low”, the user must roll below the calculated chance number. If “high”, the user must roll above the calculated chance number.

use_fake_credits Whether to use real credits (Bitcoins) or free test credits.

Response

On success,

{"payout": 200000000, "intgameaarnings": 100000, "target": "high", "fake_intbalance": 3735899600, "intbalance": 945864819, "lucky_number": 933451, "chance": 495000, "progressive_jackpots": {"5": 183344, "6": 18203040}, "server_seed_hash": "a31370a5d168d5090a54da30e073e9b8cc89b38f6f6c87c18427a523ad12bae7", "time": 82, "inttotalbet": 100000, "game_seed": "dR9YE48Qxzzpi4fbWZVJVLfHrw8jk22YccPBZptetJpY8046137452273293908", "game_id": "37f071a2b1d4c4cf9ba4d126fd6e2b7e", "intwinnings": 200000, "last_numbers": [[172412, 1, 0], [808014, 0, 0], [889373, 0, 0], [510299, 0, 0], [497105, 0, 0], [461947, 1, 0], [904113, 0, 0], [840952, 0, 0], [277194, 1, 0], [562705, 0, 0], [207255, 0, 0], [93839, 0, 0], [268275, 0, 0], [235239, 0, 0], [541591, 1, 0], [390930, 0, 0], [831266, 1, 0], [567423, 1, 0], [40346, 0, 0], [933451, 1, 0]], "progressive_win": 0, "unique_id": 111793, "prize": 200000}

payout The payout of this game. This value will be the same as what was sent in the request parameter.

chance  The calculated chance of winning the game. This value is calculated as:

    (RULESET['player_return'] / 1000000) / desired_payout_multiplier

lucky_number The lucky number that was randomly thrown. If the user chose a “low” target, the lucky number must be less than the chance cutoff value. If the user chose a “high” target, the lucky number must be higher than the chance cutoff value.

game_seed This is the seed used to randomize the reels.  Your client_seed that was passed in /dice/throw will always be at the end of this string.

game_id The primary unique ID for this game.  This ID will need to be included in further game actions.

intgameearnings The amount of money won in this game, minus your bet, in Satoshis.

progressive_win If you win a progressive bet, this key will be set to your winnings.  In Satoshis.

server_seed_hash A generated server seed for the next game you play.  You should use this value instead of calling /dice/reseed for every game.

unique_id Another unique ID for this game, not necessarily useful for API programmers.  This value is unique only within Dice games.

intwinnings The sum of the prizes plus any progressive win, in Satoshis.

progressive_jackpots The current value of the two progressive jackpots.

shutdown_time As with /account/withdraw, if the server is going down for mantenance, this value will be the time in seconds until the server shuts down.

prize The sum of the prizes plus any progressive win, in Satoshis.

last_numbers These are the last numbers that the users has rolled. The most recent number is at the end of the list. Each list item is a 3-tuple representing the number itself, whether or not the user won that game, and the value 0.

target  The chosen target value for the game. This value will be the same as what was sent in the request parameter.

intbalance Your balance after credits for this game have been deducted.

fake_intbalance Your fake credit balance after credits for this game have been deducted.

On Error,

{"time": 4, "error": "need_seed"}

error This value will be present and will be one of the following values:

  • shutting_down - You cannot play any games as the server is about to shut down.
  • need_seed - The value provided in server_seed_hash is old or invalid. You should call /slots/reseed again and retry dealing.
  • invalid credit_btc_value - You specified an invalid value for the credit size.
  • insufficient_funds - You do not have enough Bitcoins to play this game on this bet size.

CHAT API

Post a Chat message

URL

https://bitcoinvideocasino.com/chat/post

Description

Send a chat message to the chat room.

Request

GET https://bitcoinvideocasino.com/chat/post?account_key=21fa81ad3e520aa8c5a2a3214ccfe70e&msg=Hello+there%21

Request Parameters

account_key The account key for the account you wish to access (send this as a cookie header)

msg The message you would like to send to the chat room.  Must be less than 256 characters in UTF-8. Valid account_key required.

Response

{}

On success, the result is an empty JSON object.

Get a list of currently online players

URL

https://bitcoinvideocasino.com/chat/users

Description

Returns a list of the currently online players.

Request

GET https://bitcoinvideocasino.com/chat/users

Request Parameters

account_key The account key for the account you wish to access (send this as a cookie header)

Response

[{"public_id": 3873144620, "leaderboard_rank": 254, "player_ident": "94dc31ab1d"}, {"public_id": 1266030580, "leaderboard_rank": 266, "player_ident": "(A) Admin"}, …]

The result is a list of objects, each object representing one player.  The values in each object are:

public_id The unique public ID required to identify this player.  It will be required to view this player’s game stats.

leaderboard_rank This player’s leaderboard rank across all games.

player_ident The displayable name that this player is known by.  You can change your display name via the /account/rename service call.

Get Stats about a Player

URL

https://bitcoinvideocasino.com/playerstats

Description

Gives you game stats about a player.  This includes all stats for all games the player has played.

Request

GET https://bitcoinvideocasino.com/playerstats?account_key=21fa81ad3e520aa8c5a2a3214ccfe70e&public_id=387144621

Request Parameters

account_key The account key for the account you wish to access (send this as a cookie header)

public_id The public ID of the player you wish to view.  The public ID of the player can be obtained from a call to /chat/users.

Response

{"total_winnings": 282500000, "blackjack_games_played": 0, "best_blackjack_progressive_hand": null, "best_hands": [{"paytable": 0, "best_hand": 6}], "public_id": 3873144620, "time": 4, "leaderboard_rank": 91, "player_ident": "94dc31ab1d", "blackjacks": 0, "videopoker_games_played": 93, "roulette_games_played": 18189, "roulette_hits": "168", "best_roulette_progressive_hand": 3}

The result is a list of objects, each object representing one player.  The values in each object are:

total_winnings The total amount of Bitcoins this player has won (in Satoshis)

leaderboard_rank This player’s leaderboard rank across all games.

player_ident The displayable name that this player is known by.  You can change your display name via the /account/rename service call.

public_id This player’s public ID.

blackjack_games_played The number of Blackjack games this player has played.

blackjacks The number of Blackjacks this player has gotten.

best_blackjack_progressive_hand The best Blackjack progressive hand this player has gotten (see the section on Lucky 7’s).  The value is null if the player has not gotten any Lucky 7’s win.

blackjack_games_played The number of Blackjack games this player has played.

videopoker_games_played The number of Video Poker games this player has played.

best_hands A list of objects each representing the best hand a player has received within that pay table (See the video poker section “pay tables” for more information).  Each object contains the following keys:

  • paytable - The paytable index
  • best_and - The hand evaluation within that pay table.

A paytable that is not listed means the player has not won anything on this pay table.

roulette_games_played The number of Roulette games this player has played.

roulette_hits The number of times this player has hit a Straight Up number bet.

best_roulette_progressive_hand The best Roulette progressive this player has won (see the section on Roulette Lucky 0’s).  The value is null if the player has not gotten any Lucky 7’s win.

LEADERBOARD API

You can request a full leaderboard as well as a copy of your previously played 20 games at any time.

Request the leaderboards

URL

https://bitcoinvideocasino.com/leaderboards

Description

Returns to the client a copy of the full rare games, big wins, recent and leaderboard tables.  “My games” are returned via the my games API.

Request

GET https://bitcoinvideocasino.com/leaderboards

Request Parameters

None

Response

The leaderboard result can get very large.  At it’s foundation is the following JSON result:

{“rarewins”: [...], “bigwins”: [...], “recent”: [...], “leaderboard”: [...]}

Each of the four keys is a list of entries for the given board.  For the rarewins (Rare Wins), bigwins (Big Wins) and recent (Recent Games) tables, the rows are of all the same format.  The format for these tables are:

{"public_id": 3925489342, "timestamp": 1359549331, "game": "blackjack", "gamedata": {"intprogressivebet": 100000, "game_eval": "L", "progressive_hand": 3, "intgameearnings": 4900000, "inttotalbet": 100000, "progressive_win": 5000000, "unique_id": 66638, "intwinnings": 5000000}, "player_ident": "Tom12", "board": "rarewins"}

The “leaderboard” key contains a list that looks like:

{"public_id": 3678545110, "timestamp": 1359548483, "gamedata": {"intearnings": 119085656958, "unique_id": 3678545110}, "game": "earnings_only", "board": "leaderboard", "player_ident": "guy3"}

The above keys are described below in the Game Update Leaderboards section.

Request your recently played games

URL

https://bitcoinvideocasino.com/mygames

Description

Returns to the client a copy of the full “My Games” tables.  The rest of the leaderboards are returned via the Leaderboards API.

Request

GET https://bitcoinvideocasino.com/mygames?account_key=21fa81ad3e520aa8c5a2a3214ccfe70e

Request Parameters

account_key The account key for the games you wish to retrieve (send this as a cookie header)

Response

The result is a JSON list (not object) of your recently played games:

[{"public_id": 4229551822, "timestamp": 1360497266, "game": "blackjack", "gamedata": {"progressive_hand": 0, "intprogressivebet": 100000, "game_eval": "W", "intgameearnings": 100000, "inttotalbet": 100000, "progressive_win": 0, "unique_id": 66660, "intwinnings": 200000}, "player_ident": "guy3"}, ...]

The above keys are described below in the Game Update Leaderboards section.

GAME UPDATE API

The game update API should be polled regularly for latest games played and chat messages pushed out.  At Bitcoin Video Casino, each game has it’s own update service call (/videopoker/update, /blackjack/update, etc), however, the majority of the items returned are not specific to the game.  For example, the most recent chat messages will be the same regardless of whether you use /videopoker/update or /blackjack/update.  

Poll server for game updates

URL

https://bitcoinvideocasino.com/videopoker/update

https://bitcoinvideocasino.com/blackjack/update

https://bitcoinvideocasino.com/roulette/update

https://bitcoinvideocasino.com/craps/update

Description

Returns to the client information about previous games, chat messages, and progressive jackpot updates that have happened since your last update.

Request

GET https://bitcoinvideocasino.com/blackjack/update?account_key=21fa81ad3e520aa8c5a2a3214ccfe70e&progressive_bet=100000&last=136049159&chatlast=3208

GET https://bitcoinvideocasino.com/videopoker/update?account_key=21fa81ad3e520aa8c5a2a3214ccfe70e&credit_btc_value=100000&last=136049159&chatlast=3208

GET https://bitcoinvideocasino.com/roulette/update?account_key=21fa81ad3e520aa8c5a2a3214ccfe70e&credit_btc_value=100000&last=136049159&chatlast=3208

GET https://bitcoinvideocasino.com/craps/update?account_key=21fa81ad3e520aa8c5a2a3214ccfe70e&credit_btc_value=100000&last=136049159&chatlast=3208

GET https://bitcoinvideocasino.com/keno/update?account_key=21fa81ad3e520aa8c5a2a3214ccfe70e&last=136049159&chatlast=3208

GET

https://bitcoinvideocasino.com/slots/update?account_key=115f7b5be012fa14095f40e3921ed089&last=1371415167&chatlast=216&credit_btc_value=100000&_=1371415226783

GET

https://bitcoinvideocasino.com/dice/update?account_key=68fb692c841146a91e88c84b3552edbb&last=1382434001&chatlast=38&credit_btc_value=100000&_=1382434009806

Request Parameters

All updates require:

account_key The account key for the account you wish to access (send this as a cookie header)

last The ID of the most recent leaderboard game received.  This helps the server to know which games you will be sent.

chatlast The index of the most recent chat message received.  This helps the server to know which chat messages you will be sent.

Only for /videopoker/update:

credit_btc_value The credit size (in Satoshis) you are currently playing. This value is used to determine which progressive jackpot you would like returned.

Only for /blackjack/update:

progressive_bet The size of progressive side bet you are playing (in Satoshis).  This value is used to determine which progressive jackpot you would like returned.

Only for /roulette/update:

progressive_bet The size of progressive side bet you are playing (in Satoshis).  This value is used to determine which progressive jackpot you would like returned.

Only for /craps/update:

progressive_bet The size of progressive side bet you are playing (in Satoshis).  This value is used to determine which progressive jackpot you would like returned.

Only for /slots/update:

credit_btc_value The credit size (in Satoshis) you are currently playing. This value is used to determine which progressive jackpot you would like returned.

Response

The response of the update calls vary slightly between the two games.  In all cases, the object return contains the following keys:

{"players_online": 12, "chatlog": [{"index": 3214, "public_id": 2155118490, "timestamp": 1360492994.111364, "command": 0, "message": "foo", "extra": null, "player_ident": "541c155a7d", "leaderboard_rank": null}], "games_played": 425343, "btc_winnings": 320930950000, "progressive_jackpots_won": 7, "leaderboard": [{"public_id": 1266030580, "timestamp": 1360493031, "game": "videopoker", "gamedata": {"hand_eval": 1, "intbetamount": 1000000, "multiplier": -1, "intoriginalwinnings": 1000000, "unique_id": 391118, "intgameearnings": 0, "paytable": 0, "intwinnings": 1000000}, "player_ident": "(A) Admin", "board": "recent"}]}

players_online The number of players currently on the website at this time.  This number is actively maintained by calls to /videopoker/update, /blackjack/update, etc. and decreases when a client has not been active for 1 minute.

games_played The total number of all games played on Bitcoin Video Casino summed across all games.

btc_winnings The total Bitcoin winnings (in Satoshis) of all hands played across all games.

progressive_jackpots_won The total number of Jackpots won across all games

chatlog A list of the most recent chat messages. See chatlog below.

leaderboard A list of updates to the leaderboards. See leaderboards below.

In addition to the standard result, each game may include game-specific values.  

Only for /videopoker/update (these keys are included in the returned JSON object):

{"progressive_jackpot": 796627}

progressive_jackpot The current progressive jackpot in 10000ths of a credit, where a credit size is equal to the credit_btc_value included in the request.

Only for /blackjack/update (these keys are included in the returned JSON object):

{"progressive_jackpot": 824518900}

progressive_jackpot The current progressive jackpot in Satoshis.  Since we support multiple Jackpots within a single game, the jackpot returned is based on the specified progressive_bet value (usually 100000) included in the request.

Only for /roulette/update (these keys are included in the returned JSON object):

{"progressive_jackpot": 824518900, "last_numbers": [[[[4, 100000], [33, 100000], [26, 100000], [25, 100000], [14, 100000], [23, 100000], [33, 100000], [7, 100000], [21, 100000], [3, 100000], [14, 100000], [5, 100000], [20, 100000], [31, 100000], [9, 100000], [20, 100000], [34, 100000], [4, 100000], [16, 100000], [22, 100000]]}

progressive_jackpot The current progressive jackpot in Satoshis.  Since we support multiple Jackpots within a single game, the jackpot returned is based on the specified progressive_bet value (usually 100000) included in the request.

last_numbers A list of the most recently played numbers on this account.  This list will persist between playing sessions but is cleared from a server restart or update.  This list is a list of tuples of (roulette number, progressive bet).  

Only for /craps/update (these keys are included in the returned JSON object):

{"progressive_jackpot": 2048723185, "last_rolls": [[[3, 3, 6, 3, 4, 5], 100000], [[5, 4, 3, 4, 5, 2], 100000], [[1, 6, 3, 4, 4, 6], 100000], [[4, 3, 2, 5, 3, 6], 100000], [[3, 3, 1, 1, 5, 4], 100000], [[4, 5, 5, 1, 1, 6], 100000], [[1, 5, 6, 4, 4, 3], 100000], [[4, 4, 5, 6, 5, 1], 100000], [[4, 5, 2, 5, 4, 4], 100000], [[3, 3, 2, 3, 1, 5], 100000], [[2, 5, 1, 1, 3, 5], 100000], [[1, 2, 3, 2, 5, 1], 100000], [[1, 5, 2, 6, 3, 4], 100000], [[6, 3, 3, 4, 6, 1], 100000], [[4, 5, 2, 5, 1, 4], 100000], [[1, 1, 2, 1, 2, 3], 100000], [[1, 4, 4, 6, 4, 4], 100000], [[3, 5, 4, 5, 2, 6], 100000], [[4, 1, 5, 4, 2, 2], 100000], [[3, 4, 5, 6, 5, 4], 100000]]}

progressive_jackpot The current progressive jackpot in Satoshis.  Since we support multiple Jackpots within a single game, the jackpot returned is based on the specified progressive_bet value (usually 100000) included in the request.

last_rolls A list of the most recently rolled dice on this account.  This list will persist between playing sessions but is cleared from a server restart or update.  This list is a list of 2 or 6 element tuples of representing the 2 dice (if progressive was not played) or 6 dice (if progressives were played) that were rolled.

Only for /keno/update (these keys are included in the returned JSON object):

{"progressive_jackpots": {"8": 239784, "9": 247200, "10": 247200}}

progressive_jackpots The current progressive jackpots in Satoshis. Since progressive jackpots are paid out for 8, 9 and 10 hits, we return three values.

Only for /slots/update (these keys are included in the returned JSON object):

{"progressive_jackpot": 796627}

progressive_jackpot The current progressive jackpot in 10000ths of a credit, where a credit size is equal to the credit_btc_value included in the request.

Only for /dice/update (these keys are included in the returned JSON object):

"progressive_jackpots": {"5": 183344, "6": 18203040}, "last_numbers": [[172412, 1, 0], [808014, 0, 0], [889373, 0, 0], [510299, 0, 0], [497105, 0, 0], [461947, 1, 0], [904113, 0, 0], [840952, 0, 0], [277194, 1, 0], [562705, 0, 0], [207255, 0, 0], [93839, 0, 0], [268275, 0, 0], [235239, 0, 0], [541591, 1, 0], [390930, 0, 0], [831266, 1, 0], [567423, 1, 0], [40346, 0, 0], [933451, 1, 0]]

progressive_jackpots The prizes of the current progressive jackpots. Each jackpot is a dictionary entry, where the key is the number of required 7’s to win it, and the value is the size of the jackpot.

last_numbers  These are the last numbers that the users has rolled. The most recent number is at the end of the list. Each list item is a 3-tuple representing the number itself, whether or not the user won that game, and the value 0.

Chatlog

The “chatlog” key in the response to update calls contains a list of the most recent chat messages.  Messages can be sent by other players or by the server itself.  The list is ordered oldest to most recent.

Each entry in the chatlog list is an object:

{"index": 3214, "public_id": 2155118490, "timestamp": 1360492994.111364, "command": 0, "message": "foo", "extra": null, "player_ident": "541c155a7d", "leaderboard_rank": null}

index This number is the index of the chat message.  Subsequent calls to update should include the most recent index you have received as the query parameter chatlast.

public_id This is the ID of the player that send this message (or if it is a join or exit message, the ID of the player joining or leaving).

player_ident The ID of the player involved in this message.

timestamp The Unix timestamp that this message was sent.

command The type of message this is.

  • 0 - A normal message.
  • 1 - A player has joined.
  • 2 - A player has left.
  • 3 - A player has renamed himself.

message A message to display to the user.  This is only non-null for command 0 messages.

leaderboard_rank If this player is ranked, this will be his leaderboard rank.  Providing this key in the chat log allows for a more dynamic update to each players leaderboard rank.

extra An object is included for more information about the message, depending on the command.

  • 0 - No extra information.
  • 1 - {"game": "blackjack"}
  • game - The game that the player just entered (“videopoker”, “blackjack”, “roulette”)
  • 2 - No extra information.
  • 3 - No extra information.

Leaderboard

The leaderboard key in the update call contains a list of the most recent updates to the leaderboards.  It is a list in order of oldest to most recent the changes that need to be made to the leaderboards.  If you choose to interact with the leaderboards, you’ll need to maintain activate state information about the leaderboard.

Each row in the leaderboard key is of the form:

{"public_id": 1263030580, "timestamp": 1360493031, "game": "videopoker", "gamedata": {"hand_eval": 1, "intbetamount": 1000000, "multiplier": -1, "intoriginalwinnings": 1000000, "unique_id": 391118, "intgameearnings": 0, "paytable": 0, "intwinnings": 1000000}, "player_ident": "guy1", "board": "recent"}

board This tells you which leaderboard the rest of the data in this update row affects.  The only three boards are “recent”, “leaderboard” and a special “rename” type (see below).

public_id This is the ID of the player that the update belongs to

player_ident The ID of the player involved in this message.  In the event of a rename, this is the players new identity.

timestamp The Unix timestamp that this entry was generated at

game The name of the game this belongs to. Rename changes set this game key to null.

gamedata Game-specific leaderboard data (discussed below).  Rename changes set gamedata to null.

If “board” is “recent”, “rarewins”, or “bigwins”, then the game and gamedata keys will be set.  Note that “rarewins” and “bigwins” leaderboard entries not included in the game update service calls (they are only available in the /leaderboards call).  You should be able to determine the Rare Wins and Big Wins entries based upon the “recent” game entries.  For each row, the gamedata value will depend upon what game is:

For “videopoker” gamedata:

{"public_id": 1266033580, "timestamp": 1360493031, "game": "videopoker", "gamedata": {"hand_eval": 1, "intbetamount": 1000000, "multiplier": -1, "intoriginalwinnings": 1000000, "unique_id": 391118, "intgameearnings": 0, "paytable": 0, "intwinnings": 1000000}, "player_ident": "guy2", "board": "recent"}

unique_id A unique ID (within Video Poker games) to identify this game in the leaderboard.

hand_eval The final hand evaluation of this game. The hand evaluation depends on the paytable.

paytable The paytable of this game.

intbetamount The total the player bet to play this game.

intwinnings The amount the player won in Satoshis by playing this game. This field takes into account doubling down (and can therefore be zero!).

intoriginalwinnings In the case that the player played double down, this is the winnings in Satoshis that the original Video Poker game won (before doubling down).

multiplier If the player was playing double down, then this multiplier will be 0 (lose), 2, 4 or 8.  -1 indicates this was not a double down game.

intgameearnings The amount the player won in this leaderboard update.  That is, if a player played double down, this is the difference won in this round of double down, minus the last round.

For “blackjack” gamedata:

{"public_id": 4229551822, "timestamp": 1360497272, "game": "blackjack", "gamedata": {"intprogressivebet": 100000, "game_eval": "W", "progressive_hand": 0, "intgameearnings": 100000, "inttotalbet": 100000, "unique_id": 66660, "intwinnings": 200000}, "player_ident": "anon", "board": "recent"}

unique_id A unique ID (within Blackjack games) to identify this game in the leaderboard.

game_eval The final game evaluation of this game. See https://bitcoinvideocasino.com/static/blackjack_eval.js function Blackjack.get_game_eval for details on how this string is constructed.  In short, a “W” represents a won hand and a “L” represents a lost hand.

inttotalbet The total the player bet in Satoshis to play this game, including double downs and split bets.

intwinnings The amount the player won in Satoshis by playing this game.

intprogressivebet The amount the player bet towards the side progressive bet.

progressive_hand If the player won a progressive hand, this is the hand value. See the section on Lucky 7’s in the Blackjack API.

intgameearnings The amount the player won in this leaderboard update.  That is, if a player played double down, this is the difference won in this round of double down, minus the last round.

For “roulette” gamedata:

{"public_id": 4229551822, "timestamp": 1360907745, "board": "recent", "game": "roulette", "gamedata": {"progressive_hand": 0, "intprogressivebet": 100000, "prizes": {"O": 200000}, "intgameearnings": 100000, "inttotalbet": 100000, "progressive_win": 0, "unique_id": 20238, "intwinnings": 200000}, "player_ident": "xxx"}

unique_id A unique ID (within Roulette games) to identify this game in the leaderboard.

prizes The final game evaluation of this game. See the section on on Roulette Bets.  This prizes is an object, where the key is the bet and the value of that key is the winnings on that bet, including your original bet.  

inttotalbet The total the player bet in Satoshis to play this game.

intwinnings The sum of the winnings in the prizes object, plus any progressive wins, in Satoshis.

intprogressivebet The amount the player bet towards the side progressive bet.

progressive_hand If the player won a progressive hand, this is the hand value. See the section on Lucky 0’s in the Roulette API.

intgameearnings The amount the player won in this leaderboard update.  This is the difference between the bet amount and the total prizes, including progressive winnings.

For “craps” gamedata:

{"public_id": 4229551822, "timestamp": 1362054874, "game": "craps", "gamedata": {"num_points_hit": 0, "intprogressivebet": 100000, "rolled": 7, "the_point": 6, "progressive_hand": 3, "prizes": {"DPO": 1100000, "DP": 200000}, "intgameearnings": 1200000, "inttotalbet": 700000, "progressive_win": 100000, "unique_id": 17062, "intwinnings": 1400000}, "player_ident": "xxx", "board": "recent"}

unique_id A unique ID (within Craps games) to identify this game in the leaderboard.

rolled The sum of the first two dice the player rolled.

prizes The winnings after this roll. The prizes element is an object, where the key is the bet location and the value of that key is the winnings on that bet, plus your original bet.  

the_point What the point was before the player rolled for this game.

num_points_hit The length of the players point hitting streak thus far.

inttotalbet The total the player bet in Satoshis to play this game.

intwinnings The sum of the winnings in the prizes object, plus any progressive wins, in Satoshis.

intprogressivebet The amount the player bet towards the side progressive bet.

progressive_hand If the player won a progressive hand, this is the hand value. See the section on Lucky 0’s in the Roulette API.

intgameearnings The amount the player won in this leaderboard update.  This is the difference between the bet amount and the total prizes, including progressive winnings.

If “board” is of type “leaderboard”, then the entry doesn’t directly reflect a specific game.  Instead, the data can be used to dynamically update the top winners leaderboard.  The gamedata is just an update to the player’s total Bitcoin winnings:

{"public_id": 4229551822, "timestamp": 1360497272, "gamedata": {"intearnings": 59282450000, "unique_id": 4229551822}, "game": "earnings_only", "board": "leaderboard", "player_ident": "guy1"}]

unique_id A unique ID (within Video Poker games) to identify this game in the leaderboard.

intearnings The total amount the player has earned from all games played, in Satoshis.

Finally, if “board” is of type “rename”, then the leaderboard row looks like:

{"public_id": 4229551822, "timestamp": 1360497458, "gamedata": null, "game": null, "board": "rename", "player_ident": "xxx"}

PROJECTS

dooglas’s PokerBot

Source: https://github.com/dooglus/pokereval/blob/jacks-or-better/examples/PokerBot.py

Date Added: 2/28/2013

Description: dooglas (a community member at bitcointalk.org) has published the source to his Video Poker bot that is capable of reaching 99.6% EV.  He has the honor of having released the first project ever using the Bitcoin Video Casino API.  Thanks!

More to come! :)