> For the complete documentation index, see [llms.txt](https://crypto.phbot.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://crypto.phbot.org/python/example.md).

# Example

```python
from phBot import *
import talib
import numpy

EX_COINBASE = 0
EX_BINANCE = 1
EX_ALPACA = 2
EX_GEMINI = 3
EX_ALPACA_C = 4
EX_KRAKEN = 5

def signal(ex, pair):
   bars = get_bars(ex, pair, 86400)
   if bars:
      close = numpy.array([x['c'] for x in bars])
      rsi = talib.RSI(close)
      print('Python: %s -> %s %f %f %f %f %f' % (pair, bars[-1]['t'], bars[-1]['o'], bars[-1]['h'], bars[-1]['l'], bars[-1]['c'], bars[-1]['v']))
   return None

def update(ex, pair, last, avg, size, target):
   print('Python: %s -> last: %f avg: %f size: %f target: %f' % (pair, last, avg, size, target))
   return True

def finished():
   pass
```
