> For the complete documentation index, see [llms.txt](https://docs.bethash.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bethash.io/basics/api.md).

# API

## Contracts

|           |                                         |
| --------- | --------------------------------------- |
| Lottery   | <https://bloks.io/account/eoshashlotto> |
| Dice      | <https://bloks.io/account/eoshashdices> |
| Slot      | <https://bloks.io/account/eoshashslots> |
| Blackjack | <https://bloks.io/account/eoshashpoker> |
| Bulls     | <https://bloks.io/account/eoshashbulls> |

## Usage

You can use any wallet to place bet through transferring tokens to above contracts.

### quick start

```
#lottery
cleos -u https://eos.greymass.com transfer youraccount eoshashlotto "1 EOS" "-high-odd-[]-[]-[]-[]-[]-1654954945"

# dice
cleos -u https://eos.greymass.com transfer youraccount eoshashdices "1 EOS" "-under-49"

# slot
cleos -u https://eos.greymass.com transfer youraccount eoshashslots "0.35 EOS" "-1-35"

#bulls
cleos -u https://eos.greymass.com transfer youraccount eoshashbulls "1 EOS" "-1"
```

## Memo pattern:

### Lottery

```
${ref}-${high/low}-${odd/even}-[${0-9}]-[${0-9}]-[${0-9}]-[${0-9}]-[${0-9}]-${timestamp}
```

exmaple on chain: <https://bloks.io/transaction/7461eb09266480e7a70d7aa0f26dde220d962ce29e66ce0e942e04eba9618f83>

### Dice

```
${ref}-${under/over}-${number}
```

example on chain: <https://bloks.io/transaction/41ab96bb6f9345ac183e11b2a864224375666736419209b0af8bbfadf5323a3f>

### Slot

```
${ref}-${1/10/100}-${lines}
```

example on chain: <https://bloks.io/transaction/f6ddc1eb6f981511818f34269dea91dbe550607d2a069ce5db1ee4f15f507201>

### Bulls

```
${ref}-${pos}
```

example on chain: <https://bloks.io/transaction/c4000e8a13fd1166495e8358722a0d05d23d7afc57a054665fc4c47a7903cec7>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bethash.io/basics/api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
