PeerPet Api 1.0

PeerDice Api 1.0

Bit777 Api v1.0

Please follow the minimum advised interval between requests, or you might experience some latency!

Peerbet Api v1.0: Raffles Documentation

Create Raffle

URL
https://www.peerbet.org/api/raffle/?action=create
Minimum interval between requests
2 seconds
Request parameters
  • key API key used to authenticate user.
  • cur Currency code. Choices are: 10=BTC, 11=LTC and 17=DOGE. Default is 10/BTC.
  • tickets Total tickets in the raffle. Range: 2 to 10 million.
  • price Single ticket price. Range: 0.00000001 to 10K BTC.
Optional parameters
  • mode (Optional) Drawing winner type. Values are 0=Instant, 1=Provably Fair. Default is 0.
  • buy (Optional) Number of tickets to buy for this raffle. Default is 0.
  • expire (Optional) Raffle expiration time days. Default is 0=never.
  • password (Optional) Password to protect the raffle. Default is blank = public game.
  • creator_info (Optional) Show creator username. Format Boolean 1/0 (1=True, 0=False). Default is 1=True.
  • buyers_info (Optional) Show players usernames. Format Boolean 1/0 (1=True, 0=False). Default is 1=True.
  • buyers_count (Optional) Show distinct players count. Format Boolean 1/0 (1=True, 0=False). Default is 1=True.
  • buyers_tickets (Optional) Maximum number of tickets per buyer. Default is 0=unlimited.
Response
  • status 1 if successful, 0 otherwise.
  • raffle_id Unique Number of the created raffle.

{"status":1,"raffle_id":"7"}

Raffle List (active only)

URL
https://www.peerbet.org/api/raffle/?action=raffles
Minimum interval between requests
2 seconds
Important
We display a maximum of 500 raffles, so choose your filter wisely.
Optional parameters
  • my (Optional) Hide my raffles. Format Boolean 1/0 (1=True, 0=False). Default is 0.
  • mode (Optional) Drawing winner type. Values are 1=Instant, 2=Provably Fair. Default is 0=any.
  • left (Optional) Maximum tickets in the raffle to buy. Default is 0.
  • bought (Optional) Minimum bought tickets in the raffle. Default is 0.
  • empty (Optional) Hide raffles with 0 bought tickets. Format Boolean 1/0 (1=True, 0=False). Default is 1.
  • limited (Optional) Hide raffles that have a tickets-per-player limit of more than N. 0=hide all limited.
  • protected (Optional) Password protected or public raffles. Values are 1=public, 2=private. Default is 0=any.
  • anonymous (Optional) Hide raffles with hidden buyers. Format Boolean 1/0 (1=True, 0=False). Default is 0.
  • price_min (Optional) Minimum ticket price. Default is 0=no limit.
  • price_max (Optional) Maximum ticket price. Default is 0=no limit.
  • prize_min (Optional) Minimum raffle reward. Default is 0=no limit.
  • prize_max (Optional) Maximum raffle reward. Default is 0=no limit.
  • count (Optional) Number of raffles per request. Format Integer/Int32. Maximum is 2500, Default is 500.
  • order (Optional) Raffles order list. Values: id, price, prize, bought, buyers. Default: id-desc. Example: &order=prize-asc.
Response
  • status 1 if successful, 0 otherwise.
  • id Unique Number of the raffle.
  • created Date and time of raffle creation.
  • expire Raffle expiration date. Format yyyy-MM-dd HH:mm.
  • protected Password protected. Format Boolean 1/0 (1=True, 0=False).
  • currency Currency code.
  • raffle_mode Drawing winner type. Values are 0=Instant, 1=Provably Fair.
  • raffle_creator Username of the owner, else Anonymous.
  • raffle_players Distinct buyers count in this raffle.
  • ticket_price Price per ticket.
  • tickets_total Total tickets for this raffle.
  • tickets_sold Number of bought tickets.
  • tickets_limit Number of tickets per buyer.
  • my_tickets_count Number of tickets purchased by current user.
  • winning_amount Raffle winning prize.

{"status":1,"raffles":
[{"id":7,"created":"2012-12-21 12:12","expire":"","protected":0,"raffle_mode":0,"raffle_creator":"Anonymous","raffle_players":0,
"ticket_price":"0.00000007","tickets_total":7,"tickets_sold":1,"tickets_limit":0,"my_tickets_count":7,"winning_amount":"0.00000049"},
{"id":8,"created":"2012-12-21 12:21","expire":"","protected":0,"raffle_mode":0,"raffle_creator":"Anonymous","raffle_players":0,
"ticket_price":"0.00000007","tickets_total":7,"tickets_sold":1,"tickets_limit":0,"my_tickets_count":7,"winning_amount":"0.00000049"}]
}

Raffle Info

URL
https://www.peerbet.org/api/raffle/?action=info
Minimum interval between requests
2 seconds
Request parameters
  • raffle Raffle ID.
Optional parameters
  • password (Optional) Password if raffle is protected.
Response
  • status 1 if successful, 0 otherwise.
  • id Unique Number of the raffle.
  • progress Raffles status. Format Number. Values are 5=open, 3=waiting (waiting for drawing the winning ticket), 6=won (by current user), 7=lose (by current user), 8=refund (expired game).
  • created Date and time of raffle creation.
  • expire Raffle expiration date. Format 'yyyy-MM-dd HH:mm'
  • protected Password protected. Format Boolean 1/0 (1=True, 0=False).
  • currency Currency code.
  • raffle_mode Drawing winner type. Values are 0=Instant, 1=Provably Fair.
  • raffle_creator Username of the owner, else Anonymous.
  • raffle_players Distinct buyers count in this raffle.
  • ticket_price Price per ticket.
  • tickets_total Total tickets for this raffle.
  • tickets_sold Number of bought tickets.
  • tickets_limit Number of tickets per buyer.
  • my_tickets_count Number of tickets purchased by current user.
  • my_tickets_list List of the tickets purchased by current user.
  • winning_ticket Number of the winning ticket (0 if raffle is not complete).
  • winning_amount Raffle winning prize.

{"status":1,"id":7,"progress":6,
"created":"2012-12-21 12:21","expire":"","protected":0,
"raffle_mode":0,"raffle_creator":"Anonymous","raffle_players":0,
"ticket_price":"0.00000007","tickets_total":7,"tickets_sold":1,"tickets_limit":0,
"my_tickets_count":7,"my_tickets_list":"1-3,5-7",
"winning_ticket":7,"winning_amount":"0.00000049"
}

Buy Tickets

URL
https://www.peerbet.org/api/raffle/?action=buy
Minimum interval between requests
2 seconds
Request parameters
  • key API key used to authenticate user.
  • raffle Raffle ID.
  • tickets Number of tickets to buy for this raffle. Minimum 1.
Optional parameters
  • password (Optional) Password if raffle is protected.
Response
  • status 1 if successful, 0 otherwise.
  • id Unique Number of the raffle.
  • progress Raffles status. Format Number. Values are 5=open, 3=waiting (waiting for drawing the winning ticket), 6=won (by current user), 7=lose (by current user), 8=refund (expired game).
  • user_balance Updated user balance value.

{"status":1,"id":7,"progress":5,"user_balance":"0.07000000"}

Refund Tickets

URL
https://www.peerbet.org/api/raffle/?action=refund
Minimum interval between requests
2 seconds
Request parameters
  • key API key used to authenticate user.
  • raffle Raffle ID.
Response
  • status 1 if successful, 0 otherwise.
  • user_balance Updated user balance value.

{"status":1,"user_balance":"0.07000000"}

Raffle history

URL
https://www.peerbet.org/api/raffle/?action=history
Minimum interval between requests
2 seconds
Optional parameters
  • key API key used to authenticate user. Required for types me, my, won.
  • cur (Optional) Currency type. Values are: 10=BTC, 11=LTC, 17=DOGE. Default is 0=ALL.
  • type (Optional) Type of raffles. Format String. Values are: all, refund, me, my, won.
  • skip (Optional) Skip first N rows and return next N depending on count parameter.
  • count (Optional) Number of raffles per request. Range is from 10 to 250. Default is 70.
Response
  • status 1 if successful, 0 otherwise.
  • id Unique Number of the raffle.
  • progress Raffles status. Format Number. Values are 3=waiting (waiting for drawing the winning ticket), 6=won (by current user), 7=lose (by current user), 8=refund (expired game).
  • created Date and time of raffle creation.
  • finished Date and time of raffle drawing.
  • protected Password protected. Format Boolean 1/0 (1=True, 0=False).
  • raffle_mode Drawing winner type. Values are 0=Instant, 1=Provably Fair.
  • raffle_players Distinct players count in this raffle.
  • ticket_price Price per ticket.
  • tickets_total Total tickets for this raffle.
  • tickets_sold Number of bought tickets.
  • my_tickets_bet Total bet placed signet user.
  • winning_amount Raffle winning prize.

{"status":1,"raffles":
[{"id":7,"progress":6,"created":"2012-12-21 12:12","protected":0,"raffle_mode":0,"raffle_players":0,
"ticket_price":"0.00000007","tickets_total":7,"tickets_sold":1,"my_tickets_bet":"0.00000049","winning_amount":"0.00000049"},
{"id":8,"progress":7,"created":"2012-12-21 12:21","protected":0,"raffle_mode":0,"raffle_players":0,
"ticket_price":"0.00000007","tickets_total":7,"tickets_sold":1,"my_tickets_bet":"0.00000049","winning_amount":"0.00000049"}]
}