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

# Exports

### **Get Account, Add Money and Remove Money**

<pre class="language-lua"><code class="lang-lua"><strong>exports['okokBanking']:GetAccount(society)
</strong>exports['okokBanking']:AddMoney(society, value)
exports['okokBanking']:RemoveMoney(society, value)
</code></pre>

### **Add Transaction to Player Transaction History**

```lua
exports['okokBanking']:AddTransaction(citizenid, transactionData, source)
```

#### Variables:

**citizen\_id**: `The player's unique identifier - can be citizenid, job name, or account identifier`

```lua
transactionData: { 
      sender_identifier = "steam:110000123456789", -- senderIdentifier/senderCitizenid
      sender_name = "John Doe", 
      receiver_identifier = "bank", -- receiverIdentifier/receiverCitizenid
      receiver_name = "Bank", 
      value = 500, 
      type = "deposit", 
      reason = "ATM Deposit"
}         
```

**source**: `source` (Optional - The player's server source ID for webhook purposes)

### **Get Player Transaction History**

```lua
exports['okokBanking']:GetPlayerTransactions(citizenid, limit)
```

#### Variables:

**citizen\_id**: `The player's unique identifier - can be citizenid, job name, or account identifier`

**limit:** `50` (Optional - Maximum number of transactions to return. If `nil`, returns all transactions. If `0` or negative, returns empty table)

**Example Usage:**

```lua
-- Get all transactions
local allTransactions = exports['okokBanking']:GetPlayerTransactions("steam:110000123456789")

-- Get last 10 transactions
local recentTransactions = exports['okokBanking']:GetPlayerTransactions("steam:110000123456789", 10)
```


---

# 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.okokscripts.io/scripts/okokbankingv2/exports.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.
