Is there a way of detecting network speed without third party?
If you mean... how to detect how "busy" the network is... you have commands like
getmempoolinfoYou will get a return like this:
{
"size": 21264,
"bytes": 12742316,
"usage": 43390480,
"maxmempool": 300000000,
"mempoolminfee": 0.00001000,
"minrelaytxfee": 0.00001000
}
You can see there are currently over 21,000 unconfirmed transactions.
As for ways to estimate fees, you have
estimaterawfee and
estimatesmartfeeYou might want to look into those, noting of course that they are just "estimates" and no guarantee that the returned "fee
rate" will result in confirmation in the specified number of blocks... then you can use
settxfee to set the applicable fee rate... and then simply let the wallet work out the total fee for you when you create the transaction.