I hope this is the correct place. I am an amateur programmer and attempting to build a portfolio manager-type program on the Stellar Network. Right now I'm trying to call and parse Stellar network orderbooks using offers() in the 'Address' class of py-stellar-base. I'm not actually sure what the correct syntax looks like- is there like a 'genesis' stellar address where everything was initially mined? If so is this the address I should use in the API call? If anyone has done this before I'd love to read and learn. Open to any and all wisdom on the matter.
I'm not 100% sure if I understood you correctly, but you may be mixing up two concepts:
offers within the
Address class are giving you the offers that one Account has made, regardless of the actual asset (the naming is a bit off in the sdk, as an Address is pointing to an Account, in this case it's the same).
Account X wants to buy 10 Gold for 10 XLM and wants to sell 10 TokenX for 30 XLM.
In other words:
Offers are a 1:n Relationship of an
Offers (which in turn can be
Orderbook is a 1:n relationship of an
XLM as native Asset) to another one (a concept called Currency Pairs).
Offers again can be
The Orderbook is therefore living on the Horizon class.
data = dict( buying_asset_code='DSQ', buying_asset_issuer='GBDQPTQJDATT7Z7EO4COS4IMYXH44RDLLI6N6WIL5BZABGMUOVMLWMQF', selling_asset_code='D5BK', selling_asset_issuer='GBPNPZFTOXZWYYKFHSUZRLWKBTBVGSTM5C7UMUEICVEAVKBXKSCZNRIC' ) order_book = Horizon().order_book(**data)
Here's a graphical representation of that call (scroll down to the orderbook):