Get gas for transaction

I wanted to get gas for the transaction . Can I get gas from LCD or RPC such as gas gas_price ?

Yes; somewhat.

https://docs.terra.money/docs/learn/fees.html#gas

Which links here…
https://fcd.terra.dev/v1/txs/gas_prices

And the other discussion ongoing about fees is priceless. How fees on Terra work

thank you Petegordon , I mean is how to estimate gas_limit not gas_price

I want to use tx.estimate_fee() in order to get gas . set this function like this :

but get this error:
TypeError: can’t concat str to bytes
can I use any api to get gas same as gas-price that could get from fcd
thank you for your help
signer_opt = SignerOptions(
address=address,
)
tx_opt = CreateTxOptions(
msgs=[msg], memo=“send test”, gas_adjustment=1.5, fee_denoms=[“uluna”], gas_prices=gas_price + denom
, gas=‘auto’
)
then I try to get gas from tx.estimate_fee() in order to access to gas but get this error:
“error”: “int() argument must be a string, a bytes-like object or a real number, not ‘NoneType’”,

estimate_fee = self.LCDClient.tx.estimate_fee([signer_opt], tx_opt)

I think the docs suggest that the functions given by TFL will try to estimate the gas for you before the signing, never got it to work correctly on the python package. I know what you are trying, I tried as well without success to find a way. I think most protocols counter this by giving a flat fee. For example anchor is flat .25, stader is flat .5
Hope someone could answer this here as well.