API

General user information

User information

/api/v1/user [GET]
  • Parameters:
  • api_key=your-api-key
  • Response:
  • {
      'uname': 'username',
      'balance': 123.45, # Balance in bits
      'hash': 'next-mp-betting-hash'
    }

Generate new moneypot hash

/api/v1/new_hash [POST]
  • Request:
  • {
      'api_key': 'your-api-key'
    }
  • Response:
  • {
      'hash': 'new-mp-betting-hash'
    }

Games

Get user bets (last 50 bets)

/api/v1/games/bets [GET]
  • Parameters:
  • api_key=your-api-key
  • Response:
  • {
      'success': true,
      'bets': [
        {
          'created_at': '2015-07-10T20:52:33+00:00',
          'id': 123, # Look up more details using /api/v1/games/[game]/bets/[id]
          'game': 'ducks' # Name of game bet was placed on
          'wager': 123.45,
          'payout: 123.45, # Bet profit, negative on loss (bits)
        },
        [...]
      ]
    }

Generic bet info for all games

/api/v1/games/[...]/bets/[id] [GET]
  • Parameters:
  • api_key=your-api-key
  • Response:
  • {
      'success': true,
      'created_at': '2015-07-10T20:52:13.444Z',
      'id': 123,
      'hash': 12345, # Moneypot bet has used
      'wager': 123.45, # Amount wagered (bits)
      'moneypot_id': 123, # Bet ID from moneypot
      'payout': 123.45, # Bet payout (bits)
      'outcome': 12345, # Moneypot bet outcome
      'secret': 12345, # Moneypot secret value (for provable fair)
      'salt': 'hash-value', # Moneypot salt value (for provable fair)
      # Plus game specific data
    }

Generic betting return for all games

/api/v1/games/[...]/bet [POST]
  • Response (error):
  • {
      'success': false,
      'error': 'error message'
    }
  • Response (success):
  • {
      'success': true,
      'id': 123, # VegasCasinoBits bet ID
      'moneypot_id': 123, # Bet ID from moneypot
      'balance': 123.45, # New user balance (bits)
      'payout': 123.45, # Bet payout (bits)
      'outcome': 12345, # Moneypot bet outcome
      'secret': 12345, # Moneypot secret value (for provable fair)
      'salt': 'hash-value', # Moneypot salt value (for provable fair)
      'hash': 'next-mp-betting-hash',
      # Plus game specific data
    }

Duck Shooting

Get details about duck shooting bet

/api/v1/games/ducks/bets/[id] [GET]
  • Parameters:
  • api_key=your-api-key
  • Response:
  • {
      # Generic bet response data plus:
      'target': 2 # Target 2, 5 or 10
      'result': 0  # Game outcome (0: miss, 1: hit, 2: bullseye)
    }

Place bet

/api/v1/games/ducks/bet [POST]
  • Request:
  • {
      'api_key': 'your-api-key',
      'clientseed': 0, # Client seed for moneypot (unsigned 32bit integer, -1 for random)
      'wager': 123.45, # Amount to wager (bits)
      'target': 2 # Target 2, 5 or 10
    }
  • Response (success):
  • {
      # Generic betting response data plus:
      'result': 1  # Game outcome (0: miss, 1: hit, 2: bullseye)
    }

Mega Payout

Get details about mega payout bet

/api/v1/games/megapayout/bets/[id] [GET]
  • Parameters:
  • api_key=your-api-key
  • Response:
  • {
      # Generic bet response data plus:
      'win': 0  # Game outcome (0: miss, 1: hit, 2: bullseye)
    }

Place bet

/api/v1/games/megapayout/bet [POST]
  • Request:
  • {
      'api_key': 'your-api-key',
      'clientseed': 0, # Client seed for moneypot (unsigned 32bit integer, -1 for random)
      'wager': 100, # Amount to wager (bits)
      'target': 1 # Target win (btc)
    }
  • Response (success):
  • {
      # Generic betting response data plus:
      'result': 1  # Game outcome (0: lose, 1: win)
    }

Keno

Get details about keno bet

/api/v1/games/keno/bets/[id] [GET]
  • Parameters:
  • api_key=your-api-key
  • Response:
  • {
      # Generic bet response data plus:
      'picked': [1,2,3,4,5,6,7,8,9,10]  # Numbers picked by user
      'drawn': [1,2,3,4,5,6,7,8,9,10]  # Numbers picked in game
      'hits': 10  # Number of hits
    }

Place bet

/api/v1/games/keno/bet [POST]
  • Request:
  • {
      'api_key': 'your-api-key',
      'clientseed': 0, # Client seed for moneypot (unsigned 32bit integer, -1 for random)
      'wager': 100, # Amount to wager (bits)
      'picked': [1,2,3,4,5,6,7,8,9,10]  # Numbers picked by user
    }
  • Response (success):
  • {
      # Generic betting response data plus:
      'drawn': [1,2,3,4,5,6,7,8,9,10]  # Numbers picked in game
      'result': 10  # Number of hits
    }

High/Low

Cards

Cards are an integer from 0 to 51.

0: Ace of Spades, 1: Two of Spades, ... 12: King of Spades, 13: Ace of Hearts, ... 26: Ace of Diamonds, ... 39: Ace of Clubs, ... 51: King of Clubs

Get details about High/Low bet

/api/v1/games/high_low/bets/[id] [GET]
  • Parameters:
  • api_key=your-api-key
  • Response:
  • {
      # Generic bet response data plus:
      'card_house': 5  # First card
      'card_player': 2  # Second card
      'target': 0  # Target (0: low, 1: high)
    }

Place bet

/api/v1/games/high_low/bet [POST]
  • Request:
  • {
      'api_key': 'your-api-key',
      'clientseed': 0, # Client seed for moneypot (unsigned 32bit integer, -1 for random)
      'wager': 100, # Amount to wager (bits)
      'card_house': 5  # First card
      'target': 0  # Target (0: low, 1: high)
    }
  • Response (success):
  • {
      # Generic betting response data plus:
      'card_player': 2  # Second card
    }

Videopoker

Cards

Cards are returned as a string in the format RsRsRsRsRs (Rank/Suit x5)

As5hTdKsQc = Ace of Spades, 5 of Hearts, 10 of Diamonds, King of Spades, Queen of Clubs

Get details about videopoker bet

/api/v1/games/videopoker/bets/[id] [GET]
  • Parameters:
  • api_key=your-api-key
  • Response:
  • {
      # Generic bet response data plus:
      'cards': 'As2s3d4h5s'  # Cards dealt
      'name': 'Straight'  # Name of hand
    }

Place bet

/api/v1/games/videopoker/bet [POST]
  • Request:
  • {
      'api_key': 'your-api-key',
      'clientseed': 0, # Client seed for moneypot (unsigned 32bit integer, -1 for random)
      'wager': 500, # Amount to wager (bits)
    }
  • Response (success):
  • {
      # Generic betting response data plus:
      'cards': 'As2s3d4h5s'  # Cards dealt
      'name': 'Straight'  # Name of hand
    }

Dice

Get details about dice bet

/api/v1/games/dice/bets/[id] [GET]
  • Parameters:
  • api_key=your-api-key
  • Response:
  • {
      # Generic bet response data plus:
      'range': 1000,  # Bet range
      'target': 0,  # High or Low (0: low, 1: high)
      'result': 400 # Result of roll (0 - 65,536)
    }

Place bet

/api/v1/games/dice/bet [POST]
  • Request:
  • {
      'api_key': 'your-api-key',
      'clientseed': 0, # Client seed for moneypot (unsigned 32bit integer, -1 for random)
      'wager': 500, # Amount to wager (bits)
      'range': 1000,  # Bet range
      'target': 0  # High or Low (0: low, 1: high)
    }
  • Response (success):
  • {
      # Generic betting response data plus:
      'result': 400 # Result of roll (0 - 65,536)
    }

Coin Flip

Get details about coin flip bet

/api/v1/games/coin_flip/bets/[id] [GET]
  • Parameters:
  • api_key=your-api-key
  • Response:
  • {
      # Generic bet response data plus:
      'called': 1,  # Call (0: heads, 1: tails)
      'result': 0  # Outcome (0: heads, 1: tails)
    }

Place bet

/api/v1/games/coin_flip/bet [POST]
  • Request:
  • {
      'api_key': 'your-api-key',
      'clientseed': 0, # Client seed for moneypot (unsigned 32bit integer, -1 for random)
      'wager': 500, # Amount to wager (bits)
      'called': 0,  # Call (0: heads, 1: tails)
    }
  • Response (success):
  • {
      # Generic betting response data plus:
      'result': 0  # Outcome (0: heads, 1: tails)
    }